Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Change a column name in a table

Status
Not open for further replies.
Sep 10, 2009
37
US
I have tried to change a column in my table several ways:

ALTER TABLE ClientIDtoClientRollup RENAME COLUMN Description to RollupDesccription;

ALTER table ClientIDtoClientRollup change Description RollupDesccription varchar(255)

They both returns errors:

Incorrect syntax near the keyword 'COLUMN'

Line 1: Incorrect syntax near 'Description'

Please advise!!!

Thanks!
 
Before you run the following command, notice that description is spelled wrong. You have 2 c's.

Code:
sp_rename 'ClientIDtoClientRollup.Description', 'RollupDes[!]cc[/!]ription', 'COLUMN'


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top