-- 查询 系统参数值
show variables like '%max_connection%';
show variables like '%sort_buffer_size%';
-- 查询表中的字段
select * from information_schema.COLUMNS where table_name = 't_name_1' and table_schema = 'dabase_name';
-- 查询表中基本字段
select table_name,column_name,column_type,is_nullable,column_default, column_comment
from information_schema.COLUMNS
where table_name = 't_name_1' and table_schema = 'dabase_name';
-- 查询表中索引
select TABLE_NAME, INDEX_NAME, GROUP_CONCAT(COLUMN_NAME) as INDEX_COLUMN
from information_schema.statistics
where table_schema='dabase_name' and TABLE_NAME='t_name_1' GROUP BY TABLE_NAME, INDEX_NAME;
-- 查询表中基本字段
select *
from information_schema.COLUMNS
where table_name = 't_name_1' and table_schema = 'dabase_name';
---查询数据库中所有的表
select table_name,table_comment from information_schema.tables
where table_schema='dabase_name' and table_type='BASE TABLE' order by CREATE_TIME ,table_name;
-- 查询数据库中所有的表
select * from information_schema.ta