sp_rename is used to rename the objects.
The syntax is,
sp_rename "Old Object Name","New Object Name"
Code Sample:
create table Venkat_Table (id int)
-- Rename the existing table.
exec sp_rename 'Venkat_Table','Venkat_Table_New'
-- To check whether the table is available or not.
-- OR to check the properties of the table.
sp_help 'Venkat_Table_New'
Cheers,
Venkatesan Prabu .J
Hi prabhu, i need ur email id. and pls suggest me the book for sql server which contains basic architecture & clear explanation for Pages, extent,GAM,SGAM,IAM,FILE groups,Transaction log very basic
ReplyDelete