MySQL – Count the number of tables in the database

Here is the MySQL query code to count the number of tables in database.

SELECT count(*) AS Total_Tables
   WHERE TABLE_SCHEMA = 'mydatabase';

Note: You can add your database name instead of ‘mydatabase

Learn more about the similar topics:
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.