MySQL Forums
Forum List  »  Newbie

differentiate between column alias and other column with same name
Posted by: polarbear11
Date: August 02, 2005 01:45AM

Hi,

Sample SQL:
SELECT
a,
(SELECT a + 3) AS b,
(SELECT y FROM t2 WHERE b = b)
FROM t1

1. SELECT a + 3 will calculate a column with alias b
2. t2 has a column named b

Question: How can I differentiate between column alias b and t2.b. MySql treats alias b as t2.b in statement (SELECT y FROM t2 WHERE b = b)

Best regards
Polarbear

Options: ReplyQuote


Subject
Written By
Posted
differentiate between column alias and other column with same name
August 02, 2005 01:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.