How to rename a table column name in Azure Synapse?

Mangesh Barmate 6 Reputation points


Unable to rename a table column name. Please help.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,346 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 76,666 Reputation points Microsoft Employee

    Hello @Mangesh Barmate ,

    Welcome to the Microsoft Q&A platform.

    sp_rename (Transact-SQL) - This feature is in Preview for columns in user tables.

    Note: In Azure Synapse Analytics, sp_rename is in Preview for dedicated SQL pools and can only be used to rename a COLUMN in a user object.

    Columns before Rename:


    The following example renames the MedallionID column in the tripoutput table to MID.

    EXEC sp_rename 'dbo.tripoutput.MedallionID', 'MID', 'COLUMN';  


    Columns after Rename:


    Hope this helps. Do let us know if you any further queries.


    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    0 comments No comments