At 15:40 +1100 3/28/03, Daniel Rossi wrote:
hi there i would like to find out how to get the table from a field
if i am joining three tables together for instance select a.id,
b.id, c.id from a, b, c
when i get the results i need to be able to get the table name a if
i get the result from a.id , is it possible ?
The first thing that comes to mind is to do:
SELECT a.id AS table_a_id, b.id AS table_b_id, c.id AS table_c_id FROM a, b, c
or something like that.
There may be more elegant ways, but I haven't be using MySQL that long. gr
jeff
--
_ ____ +--+
/ | / /__ _/ /_ _|Jeff Shapiro |
/ |/ / _ \/ __ \/ ___/ __ \/ __ `/|Photography and Graphic Design|
/ /| / __/ / / (__ ) / / / /_/ / |Colorado Springs, CO, USA |
/_/ |_/\___/_/ /_//_/ /_/\__,_/ |www.nensha.com ||| [EMAIL PROTECTED]|
+--+
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]