ColumnStore Rename Table
The RENAME TABLE statement renames one or more ColumnStore tables.
- You cannot currently use RENAME TABLE to move a table from one database to another.
- See the ALTER TABLE syntax for an alternate to RENAME table. The following statement renames the orders table:
RENAME TABLE orders TO customer_order;
The following statement renames both the orders table and customer table:
RENAME TABLE orders TO customer_orders,customer TO customers;
You may also use RENAME TABLE to swap tables. This example swaps the customer and vendor tables (assuming the temp_table does not already exist):
RENAME TABLE customer TO temp_table, vendor TO customer,temp_table to vendor;