User connected to database v9.5 and renames a column using Alter Table window. Below error occurs when executing the Alter command:
Generated script:
ALTER TABLE "DBO"."table"
RENAME COLUMN "col" TO "col1";
ERROR:
IBM.Data.DB2.DB2Exception: ERROR [42601] [IBM][DB2/NT] SQL0104N An unexpected token "RENAME" was found following "TABLE "DBO"."table"". Expected tokens may include: "ALTER".
Stack trace:
at IBM.Data.DB2.DB2Connection.HandleError(IntPtr hHandle, SQL_HANDLE hType, RETCODE retcode)
at IBM.Data.DB2.DB2Command.a(Boolean A_0)
at IBM.Data.DB2.DB2Command.b()"
Toad 4.7 recreates the table with new column instead of issuing an Alter Table command.
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center