sql匯出

李春雨發表於2022-02-26
ELECT
    COLUMN_NAME 欄位名稱,
    COLUMN_TYPE 資料型別,
IF
    ( IS_NULLABLE = 'NO', '是', '否' ) AS '必填',
    COLUMN_COMMENT 註釋 
FROM
    INFORMATION_SCHEMA.COLUMNS 
WHERE
    table_schema = 'srms' 
    AND table_name = 'base_user_role';

相關文章