Compare tables

Discussion in 'Databases' started by Triexa, Sep 12, 2007.

  1. #1
    I'm feeling a tad lazy...

    Does anyone know if there is any tool that can compare two databases (and the tables) and allow you to create the SQL necessary to make them identical? I.e. creating new tables, adding columns, etc. etc.
     
    Triexa, Sep 12, 2007 IP
  2. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Also, comparing SOLELY the structure, not the data itself...
     
    Triexa, Sep 12, 2007 IP
  3. JenniP

    JenniP Peon

    Messages:
    250
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You didn't say what database engine, however if your using SQL Server and you don't mind paying for professional tools I would highly suggest SQL Compare from Red Gate.

    If you did want to compare data as well Red Gate also do SQL Data Compare.

    Jen
     
    JenniP, Sep 13, 2007 IP
  4. _Eugene_

    _Eugene_ Member

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    SELECT t1.id FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.id IS NULL

    returns you all ids from t1 which couldn't be found in t2.
     
    _Eugene_, Sep 14, 2007 IP