Reputation: 37
Could not rename a column in a Sybase 15 table. I am getting the below error. Please help. What am I missing?
Incorrect syntax near 'NAME1'.
CREATE TABLE TEST1 (NAME1 VARCHAR(20) NULL, NAME2 VARCHAR(20) NULL)
GO
ALTER TABLE TEST1 RENAME NAME1 TO FIRST_NAME
GO
Upvotes: 1
Views: 13972
Reputation: 418
You have tagged Sybase ASE but your link points to Sybase IQ
Here is how you do in ASE
sp_rename 'TEST1.NAME1', 'FIRST_NAME'
Upvotes: 8