RE: Finding a value in multiple tables > I want to find the value 123 in the field "id" in any one of these
tables.
SELECT id FROM TableA WHERE id = 123
UNION
SELECT id FROM TableB WHERE id = 123
UNION
SELECT id FROM TableC WHERE id = 123
Please note that UNION requires that the same number (and type?) of
fields be selected from each table.
thnx,
Chris
--
MySQL General Mailing List
For list archives:
http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=lists@pantek.com
Received on Tue Jul 31 12:00:42 2007
This archive was generated by hypermail 2.1.8
: Thu Aug 09 2007 - 19:29:43 EDT
|