Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2007

Tip: Looking for answers? Try searching our database.

V9 Column Rename

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike_dba - 26 Jul 2007 16:57 GMT
I am running V9 FP2 on DPF.  I understand that V9 LUW now lets you
rename a column.  I can't seem to get the sytax right.  Can anyone
point me to what is wrong?

db2 "ALTER TABLE myschema.mytable RENAME COLUMN  current_colname to
new_colname"

I'm getting :

DB21034E  The command was processed as an SQL statement because it was
not a
valid Command Line Processor command.  During SQL processing it
returned:
SQL0104N  An unexpected token "rename" was found following
"ALTER TABLE myschema.mytable".  Expected tokens may include:
"ALTER".
SQLSTATE=42601
Serge Rielau - 26 Jul 2007 17:22 GMT
>  I am running V9 FP2 on DPF.  I understand that V9 LUW now lets you
> rename a column.  I can't seem to get the sytax right.  Can anyone
> point me to what is wrong?
DB2 9 for LUW does not directly support RENAME column.
You can rename a column indirectly by adding a new column with the
appropriate name and dropping the original after copying the data.

Support for RENAME column is known requirement.

Cheers
Serge

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

mike_dba - 26 Jul 2007 18:56 GMT
> >  I am running V9 FP2 on DPF.  I understand that V9 LUW now lets you
> > rename a column.  I can't seem to get the sytax right.  Can anyone
[quoted text clipped - 13 lines]
> DB2 Solutions Development
> IBM Toronto Lab

Thanks for the prompt reply.  I mistakenly looked at the V9 z/OS
manual where it looks like it may be permitted.

Thanks again for your reponse.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.