| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Chris Boget | Date: | July 31 2007 3:59pm |
| Subject: | RE: Finding a value in multiple tables | ||
| View as plain text | |||
> 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
| Thread | ||
|---|---|---|
| • Finding a value in multiple tables | David Ruggles | 31 Jul |
| • Re: Finding a value in multiple tables | Wm Mussatto | 31 Jul |
| • RE: Finding a value in multiple tables | Chris Boget | 31 Jul |
| • RE: Finding a value in multiple tables | David Ruggles | 31 Jul |
