Contare tutte le tabelle in MySQL
Contare tutte le tabelle in MySQL
Un codice utile per contare tutte le tabelle create nel vostro database con MySQL. Utile anche per chi programma in PHP e si vuole interfacciare con la programmazione MySQL.
Codice:
SELECT
COUNT(*) AS tabelle
FROM
information_schema.tables
WHERE
table_schema = 'nome_database';
dove per nome_database dobbiamo inserire il nome del database che stiamo utilizzando.