The following sample code demonstrates how to rename a column in SQL server using the stored procedure
EXEC sp_rename
@objname = '[TableName].OldColumnName',
@newname = 'NewColumnName',
@objtype = 'COLUMN'
This stored procedure can also be used to rename the tables.
Friday, November 21, 2008
rename Column in SQL Server
Labels:
SQL,
SQL Database,
SQL Server Tips,
Vijaya Kadiyala
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment