Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename column in SQL Server

Tags:

sql-server

I tried the following code. Although I don't get any errors, it did not do it.

SELECT * FROM Categories EXEC sp_rename 'Active', CategoriesActive 
like image 431
zurna Avatar asked Mar 15 '10 15:03

zurna


People also ask

How do I rename a column in SQL Server?

Use SQL Server Management StudioIn Object Explorer, right-click the table in which you want to rename columns and choose Rename. Type a new column name.


1 Answers

EXEC sp_rename 'Categories.Active', 'CategoriesActive', 'COLUMN' 
like image 51
Li0liQ Avatar answered Sep 30 '22 09:09

Li0liQ