Get all Column of a specific Tables in MySQL.
SELECT
table_name as 'Table Name',
column_name as 'Column Name'
FROM
information_schema.COLUMNS
WHERE
table_schema = '$DATABASE_NAME';
AND table_name = '$TABLE_NAME';
Get all Column of some Tables in MySQL.
SELECT
table_name as 'Table Name',
column_name as 'Column Name'
FROM
information_schema.COLUMNS
WHERE
table_schema = '$DATABASE_NAME';
AND table_name in ('$TABLE_NAME1', '$TABLE_NAME2', '$TABLE_NAMEn');
Get all Columns of a specific schema in MySQL.
SELECT
table_name as 'Table Name',
column_name as 'Column Name'
FROM
information_schema.COLUMNS
WHERE
table_schema = '$DATABASE_NAME';
Get all Columns of all schemas in MySQL.
SELECT
table_name as 'Table Name',
column_name as 'Column Name'
FROM
information_schema.COLUMNS;