lava-oushudb-dt-sql-parser/test/parser/mysql/syntax/fixtures/renameTable.sql
琉易 428d851913
feat: #190 improve mysql grammer (#196)
* refactor: generic rename to mysql

* refactor: g4 with mysql syntax

* test: mysql syntax

* refactor: remove useless keywords

* refactor: remove nonReserved keywords

* refactor: lint specificFunction

---------

Co-authored-by: liuyi <liuyi@dtstack.com>
2023-11-27 15:25:40 +08:00

16 lines
425 B
SQL

-- https://dev.mysql.com/doc/refman/8.0/en/rename-table.html
/* RENAME TABLE
tbl_name TO new_tbl_name
[, tbl_name2 TO new_tbl_name2] ... */
RENAME TABLE tbl_name TO new_tbl_name, tbl_name1 TO new_tbl_name1;
RENAME TABLE tbl_name TO new_tbl_name;
RENAME TABLE old_table TO tmp_table,
new_table TO old_table,
tmp_table TO new_table;
RENAME TABLE current_db.tbl_name TO other_db.tbl_name;