有时我们需要对数据进行探究,首先想到的就是该表有哪些字段,以及字段的类型和注释,那么我们该如何快速的知道呢?
1、查询 Test 数据库 的 所有表,以及对应的建表语句
select database,name,create_table_query
from `system`.tables
where database = 'Test'
2、查询 某些表的 所有字段名、字段类型以及字段注释:
select table,name,type,comment
from `system`.columns
where table in('test_1','test_2','test_3')
仅供参考