2015-07-21 103 views

回答

4

你可以做

SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'dbName'; 

OR

USE databasename; SHOW TABLES; SELECT FOUND_ROWS(); 
1

您可以用SQL語句做到這一點:

select count(*) from information_schema.tables 
1

SELECT COUNT(*)FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'DBNAME';

2

做查詢information_schema.tables

SELECT COUNT(*) FROM information_schema.TABLES 
WHERE TABLE_SCHEMA='database_name'; 
0

使用下面的查詢:

SELECT COUNT(*) FROM information_schema.TABLES 
WHERE TABLE_SCHEMA='database_name';