SETHA SITE INFORMATION

  • Increase font size
  • Default font size
  • Decrease font size

How to rename column in SQL Server using T-SQL?

E-mail Print PDF
Suppose we have database named StudentDB and table named Student in Microsoft SQL Server 2008.
Below T-SQL code uses to rename column StdID of table Student to new column named StudentID.
USE StudentDB

EXEC sp_rename 'Student.StdID', 'StudentID','COLUMN'