MYSQL 모든 테이블의 명세를 만드는 쿼리 -- MySQL



SELECT  A.TABLE_NAME,
  B.TABLE_COMMENT,
  A.ORDINAL_POSITION,
  A.COLUMN_NAME,
  A.COLUMN_COMMENT,
  A.COLUMN_TYPE,
  A.COLUMN_KEY,
  A.IS_NULLABLE,
  A.COLUMN_DEFAULT
FROM information_schema.COLUMNS A,
            information_schema.TABLES B
WHERE  A.TABLE_NAME = B.TABLE_NAME
AND       B.TABLE_SCHEMA = A.TABLE_SCHEMA 
AND       A.TABLE_SCHEMA = '디비명'
ORDER BY A.TABLE_NAME, B.TABLE_COMMENT, A.ORDINAL_POSITION 


1 2 3 4 5 6 7 8 9 10 다음