SpringBoot2.0 + MybatisPlus3.0 + Avue + ElementUI development recording code generator

1. query the database information Sql (2019-06-01)

-- 查询表
SELECT
    table_name AS tableName,
    ENGINE,
    table_comment AS comments,
    create_time AS createTime 
FROM
    information_schema.TABLES 
WHERE
    table_schema = ( SELECT DATABASE ( ));

-- 查询列
SELECT
    column_name AS columnName,
    data_type AS dataType,
    column_comment AS comments,
    column_key AS columnKey,
    is_nullable AS isNullable,
    column_type AS columnType,
    character_octet_length AS characterOctetLength,
    extra 
FROM
    information_schema.COLUMNS 
WHERE
    table_name = 'sy_user' 
    AND table_schema = ( SELECT DATABASE ( ) ) 
ORDER BY
    ordinal_position;   

Guess you like

Origin blog.csdn.net/weixin_33757609/article/details/91022400