How to count the number of tables in MySQL?

8

I'm trying to count the number of tables in a MySQL database.

I tried to do the following but returned a syntax error:

SELECT COUNT(SHOW TABLES)

How can I do this?

    
asked by anonymous 05.08.2015 / 18:44

1 answer

8

Do this:

USE databasename; SHOW TABLES; SELECT FOUND_ROWS();

Font .

    
05.08.2015 / 18:46