Home > DeveloperSection > Forums > How to rename table in SQL Server?
ezra heywood
ezra heywood

Total Post:145

Points:1019
Posted on    May-16-2013 3:41 AM

 MSSQL Server MSSQL Server 
Ratings:


 1 Reply(s)
 966  View(s)
Rate this:
Hi Mindstickians!

I'm working with SQL Server and i'm new in database. I have created few tables in database not a proper naming convention. Now, I want to rename those table with proper naming convention. 

Your help is greatly appreciated.



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    May-16-2013 8:26 AM

Hi Ezra!

Try as following

Syntax:

sp_rename 'Your table name' 'New table name'

Example:

sp_rename 'MyTable', 'empTable'

sp_rename this is in-build  stored procedure

Don't want to miss updates? Please click the below button!

Follow MindStick