tsql rename table and column
--rename a table:
EXEC sp_rename 'OldTableName', 'NewTableName'
--rename a column:
EXEC sp_rename
@objname = 'TableName.OldColumnName',
@newname = 'NewColumnName',
@objtype = 'COLUMN'
Achievement provides the only real pleasure in life
--rename a table:
EXEC sp_rename 'OldTableName', 'NewTableName'
--rename a column:
EXEC sp_rename
@objname = 'TableName.OldColumnName',
@newname = 'NewColumnName',
@objtype = 'COLUMN'
Posted by SF at 10:12 am
No comments:
Post a Comment