1.MySQL查询当前数据库中所有记录不为空的表
select TABLE_NAME from information_schema.tables where TABLE_SCHEMA='数据库名称' and table_rows>0;
2.对数据库表名进行模糊查询
SELECT table_name FROM information_schema.tables WHERE table_schema='dsm' AND table_name LIKE '%temperature%'
3.查询表注释,建表信息
show create table base_level_info;
4.查询指定数据库下面备注带有“库存”的表
SELECT TABLE_NAME,TABLE_COMMENT FROM information_schema.TABLES
WHERE table_schema='dsm2' AND TABLE_COMMENT LIKE '%库存%';`