Vra

How to count number of tables in a database ?

SELECT COUNT *    
FROM SHOW TABLES AS A
Was dit nuttig?

Oplossing 2

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

Ander wenke

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

Source

This one is easy

USE databasename; SHOW TABLES; SELECT FOUND_ROWS();
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top