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: 316

Filed under:
|

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

Related posts about mysql

Related posts about database-comparison

  • Compare 2 database

    as seen on Stack Overflow - Search for 'Stack Overflow'
    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… >>> More

  • DB comparison tools

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Has someone experience with database comparison tools? Which one you would recommend? We are currently using "SQLCompare" from Redgate, but I am curious to know if there are better tools on the market. The main requirement is that they should be able to compare scripts folder against a live database… >>> More

  • 3rd Party Tools: dbForge Studio for SQL Server

    as seen on SQL Blog - Search for 'SQL Blog'
    I've been taking a look at some of the 3rd party tools for SQL Server. Today, I looked at DBForge Studio for SQL Server from the team at DevArt. Installation was smooth. I did find it odd that it defaults to SQL authentication, not to Windows but either works fine. I like the way they have followed… >>> More

  • MySQL FULLTEXT aggravation

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hi - I'm having problems with case-sensitivity in MySQL FULLTEXT searches. I've just followed the FULLTEXT example in the MySQL doco at http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html . I'll post it here for ease of reference ... CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT… >>> More

  • Syncing magento database froms development to production

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I use git for version control. I have a development, staging and production environment. When I finish in development I push to staging for review by the client. When approved, I push changes from staging to production. That works fine as long as there is no database changes. What happens if I install… >>> More