Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kathyc
Starting Member
9 Posts |
Posted - 2008-08-16 : 17:09:23
|
| Hi,I need to rename a column "height" to height_cms"Here is my query:ALTER TABLE basic RENAME height TO height_cms;Here is the error message:Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'height'., What am I doing wrong?Thanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-16 : 17:29:35
|
sp_rename 'basic.height', 'height_cms'There might be som additional parameters to set. I can't remember right now.You can look up sp_rename in Books Online for more information. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-08-16 : 18:32:37
|
| sp_rename 'basic.height', 'height_cms', 'column'GreetingsWebfredToo Old to Rock 'n' Roll, Too Young to Die |
 |
|
|
|
|
|