mysql查同个实例两个数据库中的表名差异

 

 

复制代码
select
    TABLE_NAME
from (
    select 
         TABLE_NAME
        ,count(1) as cnt
    from information_schema.tables
    where TABLE_SCHEMA in ('db_a','db_b')
        and (table_name not like '%2018%' and table_name not like '%2019%')
    group by TABLE_NAME
) t1
where cnt <> 2
limit 50
;
复制代码

 

posted @   chenzechao  阅读(602)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示