Connecting Tech Pros Worldwide Help | Site Map

Alter Table name

Newbie
 
Join Date: Sep 2006
Posts: 1
#1: Sep 26 '06
Hi All,
i wanted to know how should i alter the name of a table.
Im using Alter table name Rename to new_name.

But its not working


kindly help me out!!!!!
Newbie
 
Join Date: Sep 2006
Posts: 10
#2: Sep 26 '06

re: Alter Table name


Hi,

Find the query for raname table name,

sp_rename 'OLD_Name','NEW_Name'


sp_rename :

Changes the name of a user-created object (for example, table, column, or user-defined data type) in the current database.

Syntax
sp_rename [ @objname = ] 'object_name' ,
[ @newname = ] 'new_name'
[ , [ @objtype = ] 'object_type' ]

Regards,
Sharmila
Newbie
 
Join Date: Nov 2008
Posts: 1
#3: Nov 14 '08

re: Alter Table name


Thanks for the useful reply.
Reply