Question: how to check if a table exists in mysql?
Answer: You can query the INFORMATION_SCHEMA tables system view: SELECT table_name FROM information_schema. tables WHERE table_schema = 'databasename' AND table_name = 'testtable'; If no rows returned, then the table doesn't exist.