Home » RDBMS Server » Server Administration » alter column width
alter column width [message #373837] Tue, 15 May 2001 02:40 Go to next message
Mahesh
Messages: 90
Registered: January 2001
Member
how to alter the column width of the existing column in a table
Re: alter column width [message #373841 is a reply to message #373837] Tue, 15 May 2001 08:10 Go to previous message
Bala
Messages: 205
Registered: November 1999
Senior Member
Hi

To increase the length...
alter table t1 modify(col1 datatype(newlength));

EX.
alter table emp modify (empname varchar2(30));

To decrease the width....
you have to empty the column for which you want to reduce the length.
The quick way is

Rename the existing table to tablename_copy.
and create table with original name, and desired column widths.
Now insert the data into the newly created table by selecting from _copy table.

Bala.
Previous Topic: alter column width
Next Topic: Supressing blank spaces
Goto Forum:
  


Current Time: Tue Jul 02 17:31:39 CDT 2024