Re: Comparing tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<quote who="Ron Allen">
> I would like to compare 2 tables in a database to determine which records
> are different!!!  Any clues out there.  Thanks in advance!

You didn't say which DBMS you are using. If you're using a DBMS which
supports INTERSECT (not MySQL), and assuming the two tables have the same
column names and types, you can do this:

  (SELECT * FROM table1) INTERSECT (SELECT * FROM table2)

For MySQL INTERSECT support, monitor this doc:

  http://www.mysql.com/doc/en/TODO_sometime.html

--Dave

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux