# SQL

# 1. 数据库操作

# 1.1. 获取所有表的表名

select
    table_name
from
    information_schema.tables
where
    table_schema='${databaseName}'

# 1.2. 获取表字段的信息

select
    column_name,
    is_nullable,
    column_key,
    data_type,
    column_comment
from
    information_schema.columns t
where
    table_schema='${databaseName}' and table_name='${tableName}'
本章目录