Mysql: RENAME TABLE IF EXISTS

后端 未结 8 1264
甜味超标
甜味超标 2020-12-10 01:08

This DROP TABLE IF EXISTS works, too bad that RENAME TABLE IF EXISTS doesn\'t work.

Can anyone suggest a solution for this query?



        
8条回答
  •  旧巷少年郎
    2020-12-10 02:03

    If you are familiar with PL/SQL, then you can check for existence of table by querying information_schema.columns and based on this perform rename

提交回复
热议问题