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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 show error during renaming a table

Author  Topic 

divyagr
Starting Member

29 Posts

Posted - 2009-01-14 : 06:30:57
hi all,

i have fired a code like dis to rename a table but it shows error


alter table age1
rename to newagetable


its shows error like dis

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'rename'.


with regards,
Divya

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-14 : 06:37:15
What does Books Online say?
Books Online is the SQL Server help file.

Are you using MICROSOFT SQL Server?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

divyagr
Starting Member

29 Posts

Posted - 2009-01-14 : 06:39:07
s pesco im using ms sql2005.....

with regards,
Divya
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-14 : 06:45:00
See Books Online how to use stored procedure

sp_rename




E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-14 : 07:23:29
http://doc.ddart.net/mssql/sql70/sp_ra-rz_11.htm
Go to Top of Page
   

- Advertisement -