This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-22. For the latest, interactive version please visit https://mariadb.com/kb/.

ColumnStore Rename Table

The RENAME TABLE statement renames one or more ColumnStore tables.

Notes:

  • 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;
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.