List:General Discussion« Previous MessageNext Message »
From:SGreen Date:August 26 2005 2:02pm
Subject:Re: Compare two tables
View as plain text  
Alfredo Cole <alfredo@stripped> wrote on 08/26/2005 10:07:30 AM:

> Hi:
> 
> I need to compare the structure of two tables (fields, field types, 
field 
> lengths, indices, etc.) to determine if they have the same schema, even 
if 
> the fields may be in a different order. Is there a command in mysql that 
will 
> do this? This will be used to determine if the tables are basically the 
same, 
> or if they need to be upgraded based on the table structures of a 
central 
> office.
> 
> Thank you.
> 
> -- 
> Alfredo J. Cole
> Grupo ACyC
> 

No, there is no built-in command to make this kind of comparison. However 
the family of SHOW ... commands (SHOW CREATE TABLE, SHOW COLUMNS, etc.) 
will really help you to do this kind of comparison by hand.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Thread
Compare two tablesAlfredo Cole26 Aug
  • Re: Compare two tablesSGreen26 Aug
  • Re: Compare two tablesMartijn Tonies26 Aug
    • Re: Compare two tablesAlfredo Cole26 Aug
      • Re: Compare two tablesMark Addison26 Aug
  • Re: Compare two tablesMartijn Tonies26 Aug
  • Re: Compare two tablesPeter Brawley26 Aug
RE: Compare two tablesGordon Bruce26 Aug
  • Re: Compare two tablesAlfredo Cole26 Aug