SELECT
A.TABLE_NAME AS テーブル名,
B.ORDINAL_POSITION AS 項目番号,
B.COLUMN_NAME AS 列名,
B.COLUMN_TYPE AS 型,
B.IS_NULLABLE AS NULL可否,
B.COLUMN_KEY AS キー,
B.COLUMN_DEFAULT AS 初期値,
B.COLUMN_COMMENT AS コメント
FROM information_schema.TABLES A
LEFT OUTER JOIN information_schema.COLUMNS
B
ON B.TABLE_NAME = A.TABLE_NAME
WHERE A.TABLE_SCHEMA = 'DB名'
AND A.TABLE_TYPE = 'BASE TABLE'
ORDER BY A.TABLE_NAME