How to change a table name using an SQL query?

后端 未结 10 1891
北海茫月
北海茫月 2020-12-12 17:05

How can I in change the table name using a query statement?

I used the following syntax but I couldn\'t find the rename keyword in SQL server 2005.

A         


        
相关标签:
10条回答
  • 2020-12-12 17:34
    RENAME TABLE old_table_name TO new_table_name;
    
    0 讨论(0)
  • 2020-12-12 17:35

    execute this command

    sp_rename 'Employee','EData'
    
    0 讨论(0)
  • 2020-12-12 17:36

    rename table name :

    RENAME TABLE old_tableName TO new_tableName;
    

    for example:

    RENAME TABLE company_name TO company_master;
    
    0 讨论(0)
  • 2020-12-12 17:40

    ALTER TABLE table_name RENAME TO new_table_name; works in MySQL as well.

    Alternatively: RENAME TABLE table_name TO new_table_name;

    0 讨论(0)
提交回复
热议问题