"Brad Harriger" <[EMAIL PROTECTED]> wrote:
> How does MySQL handle duplicate column names?

Kind of open ended, but I'll give it a shot.  MySQL doesn't allow duplicate
column names within a table, but if you are referring to a query accessing
multiple tables containing fields with the same name then you need to
preface the field with the tablename so MySQL knows which you are referring
to.

SELECT tablea.id FROM tablea, tableb;

SELECT tablea.id as a_id, tableb.id as b_id FROM tablea, tableb;

HTH,

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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