1、查询表结构 select * from information_schema.columns where table_schema = 'dbname' and table_name = 'tablename'; -- dbname为数据库名 -- tablename为表名