Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Altering the column datatype of an existing table 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi,

I'm struggling to find the right syntax for enlarging a varchar2 column from 20 to 50 characters. There seem to be so many variations documented! At the moment I am using:
Code:
ALTER TABLE table_name ALTER COLUMN column_name VARCHAR2(50);

Your help would be much appreciated!

Clive [infinity]
 
Can you share those variations with us? The only one I know is

Code:
ALTER TABLE table_name MODIFY column_name VARCHAR2(50)



Regards, Dima
 
Thank you very much - that works!

Other ways I saw on different sites were as follows:
Code:
ALTER TABLE table_name ALTER [COLUMN] column_name VARCHAR2(50);
or
Code:
ALTER TABLE table_name ALTER [COLUMN] column_name [TYPE] VARCHAR2(50);

Clive [infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top