HOW TO RENAME TABLE IN SQL SERVER?

ezra heywood

Total Post:145

Points:1019
Posted by  ezra heywood
 1318  View(s)
Ratings:
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.

  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: How to rename table in SQL Server?

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!