467,881 Members | 1,194 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,881 developers. It's quick & easy.

V9 Column Rename

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

Jul 26 '07 #1
  • viewed: 9895
Share:
2 Replies
mike_dba wrote:
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

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 26 '07 #2
On Jul 26, 12:22 pm, Serge Rielau <srie...@ca.ibm.comwrote:
mike_dba wrote:
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

--
Serge Rielau
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.
Jul 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by TroelsM | last post: by
1 post views Thread by Marble | last post: by
5 posts views Thread by Robert Stearns | last post: by
11 posts views Thread by Steven Smith | last post: by
reply views Thread by juliane26 | last post: by
1 post views Thread by Gladiator | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.