I have three tables (x, y, and z) with the same 3 fields (id, name,
number). If I do:

SELECT * FROM x, y, z WHERE ...

each row of my result will contain 3 id fields, 3 name fields, and 3
number fields.

Of course, I can/should do:

SELECT x.id AS x_id, x.name AS  x_name, x.number AS x_number,
      y.id AS y_id, y.name AS  y_name, y.number AS y_number,
      z.id AS z_id, z.name AS  z_name, z.number AS z_number
FROM x, y, z WHERE ...

Short of scripting, is there any way to get MySQL to do this? Something like:

SELECT * FROM x, y, z PREFIX FIELDS WITH TABLE NAME WHERE ...

--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to