How to rename a table:
EXEC sp_rename 'OldTableName','NewTableName'
How to rename a column:
EXEC sp_rename
@objname = 'TableName.OldColumnName',
@newname = 'NewColumnName',
@objtype = 'COLUMN'
For a more detailed explanation of sp_rename check out this MSDN article: http://msdn2.microsoft.com/en-us/library/ms188351.aspx
No comments:
Post a Comment