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
;
原文地址:https://www.cnblogs.com/chenzechao/p/11423870.html