On Mon, Sep 23, 2002 at 11:20:49AM -0500, Paul DuBois wrote:

I had a question about the use of the UNION command in this
context.

The original poster asked about getting the name of the
_table_ as well as some other data, which would seem to be
relatively necessary for doing many types of things with the
results of the query. For example, if you issue a query that
gives you the union of seven different tables, and then you
want to do another query based on these results, you'll need
to know which of the seven tables a particular result came
from. The docs on UNION don't seem to address this, none of
the responses mentioned it, and I can't seem to find any
discussion of how to retrieve the table name in a SELECT query
(I acknowledge that most of the time you wouldn't need it, but
in a UNION you might).

How do you get the table name returned as part of the query
results? Or am I misunderstanding how one would work with the
results?

Jesse Sheidlower


---------------------------------------------------------------------
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