سؤال

How to count number of tables in a database ?

SELECT COUNT *    
FROM SHOW TABLES AS A
هل كانت مفيدة؟

المحلول 2

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

نصائح أخرى

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

Source

This one is easy

USE databasename; SHOW TABLES; SELECT FOUND_ROWS();
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top