Monday, January 28, 2013

SQL Server notes

Rename a field (or column) in a table:
EXEC sp_rename 'table_name.old_name', 'new_name', 'COLUMN';

sp_rename is a SQL Server function name.