Alter table Column Rename is not working

Database

Alter table Column Rename is not working

Try to execute the PL/SQl Script

drop table t1;

CREATE TABLE T1
(
a CHAR(18) NOT NULL
TITLE 'a' ,
b CHAR(18)
TITLE 'b' ,
c CHAR(18)
TITLE 'c' ,
d CHAR(18)
TITLE 'd'
);

ALTER TABLE T1 RENAME b AS TO b1 ;

An error is stating that :

Code = 3707.
3707: Syntax error, expected something like a name between the 'as' keyword and the 'TO' keyword.
Output directed to Answer set window

Even though this was the correct syntax given as for as the Terradata
Documentation.

But the following script works fine fore

ALTER TABLE T1 RENAME b AS b1 ;

ALTER TABLE T1 RENAME b TO b1 ;

Please help me to know the insight of this.
Whether is that a documentation Error or Something else.

Thanks'
RAM

3 REPLIES
Teradata Employee

Re: Alter table Column Rename is not working

Yes, I believe it's a documentation error.
Either TO or AS is acceptable. One or the other must be specified, but not both.
N/A

Re: Alter table Column Rename is not working

I don't know which documentation you are referring, documentation for V2R6 says that Renaming syntax is:

Rename Table databasename.oldtable to databasename.newtable;

its working for me :-)

N/A

Re: Alter table Column Rename is not working

Oh sorry, i thought you are talking about renaming table.