On Wednesday 20 February 2002 09:20, Web boy wrote:

You want to use UNION. If I remember correctly its a fairly new feature for 
MySQL, but its a standard SQL thing.  From the manual:

SELECT ...
UNION [ALL]
SELECT ...
  [UNION
   SELECT ...]

UNION is implemented in MySQL 4.0.0.

UNION is used to combine the result from many SELECT statements into one 
result set.

The SELECT commands are normal select commands, but with the following 
restrictions:

    * Only the last SELECT command can have INTO OUTFILE.
    * Only the last SELECT command can have ORDER BY.

If you don't use the keyword ALL for the UNION, all returned rows will be 
unique, like if you had done a DISTINCT for the total result set. If you 
specify ALL, then you will get all matching rows from all the used SELECT 
statements.


>
> Now how in the world to I take run this query against
> both sets of tables and then combine the data and
> bring back a result?
>
> Thanks---
>
> =====
> Want to know when a band is playing or want to see what bands are playing
> at your favorite bar go to www.buffalogigs.com
>

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to