Describe all tables in the database in a single statement?

There is no statement that describe all tables at once. Here’s some options:

SELECT * FROM information_schema.columns WHERE table_schema="db_name";
SELECT * FROM information_schema.columns WHERE table_schema="db_name" ORDER BY TABLE_NAME, ORDINAL_POSITION;
SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, COLUMN_TYPE, COLUMN_COMMENT, ORDINAL_POSITION FROM information_schema.columns WHERE table_schema="db_name" ORDER BY TABLE_NAME, ORDINAL_POSITION;
SELECT * FROM information_schema.columns WHERE table_schema != 'information_schema';

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)