I know how to use queries but I've never had to use one for this particular tasks .. I know about the SHOW TABLES; command .. How can I write a query to check if a particular table exists in a MYSQL database .. For example , a query that checks if table MEMBERS exists in database called USERS ??
2 Answers
You can use INFORMATION_SCHEMA.TABLES
USE USERS;
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'MEMBERS'