List:General Discussion« Previous MessageNext Message »
From:Alfredo Cole Date:August 26 2005 3:22pm
Subject:Re: Compare two tables
View as plain text  
El Viernes, 26 de Agosto de 2005 08:56, Gordon Bruce escribió:
 > If you have the 5.0.x version of MySQL then INFROMATION SCHEMA can give
 > you what you want. i.e.
 >
 > SELECT a.*, b.*
 > FROM   INFORMATION_SCHEMA.COLUMNS AS a
 >        INNER JOIN _SCHEMA.COLUMNS AS b
 >        ON (a.column_name = b.column_name)
 > WHERE  a.TABLE_NAME = 'foo_1'
 >        AND b.TABLE_NAME = 'foo_2'
 >
 > If you look up INFORMATION SCHEMA in the documentation you will find the
 > table definitions to chose the columns you need for your comparison.
 >
 > 21. The INFORMATION_SCHEMA Information Database
 > 21.1. INFORMATION_SCHEMA Tables
 >

This is very interesting. I'm using 4.1.12 as it is the stable version, but I 
will keep an eye on version 5.

Thank you.

-- 
Alfredo J. Cole
Grupo ACyC
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