1. 获取检表语句
直接获取建表语句。
SHOW CREATE TABLE “table_name”
2. sql获取schema信息
select * from information_schema.columns where table_schema =‘db_name‘ and table_name = ‘table_name‘;
including: COLUMN_NAME, ORDINAL_POSITION,COLUMN_DEFAULT, IS_NULLABLE, DATA_TYPE,COLUMN_TYPE, COLUMN_KEY, EXTRA, COLUMN_COMMENT....
(东西太杂了,待整理进一篇blog内)
原文:https://www.cnblogs.com/GW977/p/11520940.html