This DROP TABLE IF EXISTS works, too bad that RENAME TABLE IF EXISTS doesn\'t work.
DROP TABLE IF EXISTS
RENAME TABLE IF EXISTS
Can anyone suggest a solution for this query?
First create table IF NOT EXISTS. Then RENAME it, so it will always exist!
IF NOT EXISTS
RENAME
Otherwise, rename the table, and if it doesn't exist just handle the error.
It is obvious, but it works.
rename table oldtablename to newtablename