Home » SQL & PL/SQL » SQL & PL/SQL » width change of one column
width change of one column [message #4442] Tue, 10 December 2002 00:52 Go to next message
arun
Messages: 67
Registered: January 2000
Member
Subject: Please help me

Question :
I have one doubt.
One table t1 have more than 10,000 records.
Many constraints and object(view,index) are linked to
above table.
In this table one column a1 number(5).
Problem is now user want to change the width
number(3).

How i'll change the width of column a1 from number(5)
to nuumber(3) if that column have many records.
If any column have records then we cann't use the
alter table t1 modify (a1 number(3));

it' will give error.
Question is how i'll change the width of column a1
from number(5) to number(3) without touching the
reords.
Any help would be highly appreciated.

Please do reply urgent.
Regards
Arun
email_id arunksingh73@yahoo.com
Re: width change of one column [message #4444 is a reply to message #4442] Tue, 10 December 2002 06:55 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
you cannot reduce the length ( from number(5) to number(3)).
u can only increase it (say 5 to 7).
else
create another table with new ddl defintions( number(3)) and drop the old table and rename newtable to old.
(unles u have foreing key relations, this would be no problem).
Previous Topic: UTL_FILE RENAME FUNCTION
Next Topic: Table related view
Goto Forum:
  


Current Time: Thu May 16 15:52:27 CDT 2024