Compare 2 database
Posted
by shantanuo
on Stack Overflow
See other posts from Stack Overflow
or by shantanuo
Published on 2010-05-16T05:11:58Z
Indexed on
2010/05/16
5:20 UTC
Read the original article
Hit count: 355
mysql
|database-comparison
I have 2 identical databases. abc15 and abc18. But one of the database has one extra table and I need to find that. I thought the following query should return it, but is it not showing the record that I expect.
select * from information_schema.tables as a
left join information_schema.tables as b
on a.TABLE_SCHEMA=b.TABLE_SCHEMA AND a.TABLE_NAME=b.TABLE_NAME
where a.TABLE_SCHEMA = 'abc15' AND b.TABLE_SCHEMA='abc18' and
b.TABLE_NAME IS NULL
© Stack Overflow or respective owner