RENAME TABLE

Overview

Renames one or more tables or views, but not the associated privileges.

USAGE

Common Syntax:

RENAME TABLE
   <tbl_name> TO <new_tbl_name>
   [, <tbl_name2> TO <new_tbl_name2>] ...

DETAILS

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

RENAME TABLE

To rename a table or view:

RENAME TABLE
   customers TO 2022_customers,
   customers_view TO 2022_customers_view;

Move a Table to Another Database

To move a table from one database to another:

RENAME TABLE
   db1.customers TO db2.customers,
   db1.invoices TO db2.invoices;

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES