Mysql根据注释查询表名

【查询相同数据的SQL】

-- 查相同运单号  
select main_waybill_no,count(*) as count from overseas_port_warning_unload_detail group by main_waybill_no having count>1;

Select table_name 表名,TABLE_COMMENT '表注解' from INFORMATION_SCHEMA.TABLES Where table_schema = '数据库名' AND TABLE_COMMENT  LIKE '%注解关键词%';


Select table_name 表名,TABLE_COMMENT '表注解' from INFORMATION_SCHEMA.TABLES Where table_schema = 'test' AND TABLE_COMMENT  LIKE '%基础数据%';

 

你可能感兴趣的:(Mysql,相关资料)