728x90
information_schema.columns 를 사용
SELECT
TABLE_NAME, "", COLUMN_NAME, COLUMN_COMMENT, ORDINAL_POSITION, COLUMN_TYPE, COLUMN_KEY, IF(IS_NULLABLE='NO', 'YES', 'NO') AS NOT_NULL, TABLE_SCHEMA
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'painting' AND TABLE_NAME ='PA_PLC_FACL_RUN_MES_L';
반응형