See:
http://www.mysql.com/doc/P/r/Problems_with_alias.html
Gurhan
-Original Message-
From: Massimo Colurcio [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 5:09 PM
To: mySQL List
Subject: Alias & WHERE
It seems I cannot use an alias in WHERE clause, but I can use i
It seems I cannot use an alias in WHERE clause, but I can use it in ORDER BY.
An examples:
this doesn't work
SELECT field1 AS ABC, field2 AS XXX, field3 AS QQQ FROM mytable WHERE ABC =
'abc' ORDER BY ABC
this works
SELECT field1 AS ABC, field2 AS XXX, field3 AS QQQ FROM mytable WHERE
field1 =
Hi.
On Wed, May 29, 2002 at 02:36:11AM +0200, [EMAIL PROTECTED] wrote:
> It seems I cannot use an alias in WHERE clause, but I can use it in ORDER
> BY.
Correct.
> An examples:
>
> this doesnt work
> SELECT field1 AS ABC, field2 AS XXX, field3 AS QQQ FROM mytable WHERE ABC =
> 'abc' ORDER BY
It seems I cannot use an alias in WHERE clause, but I can use it in ORDER BY.
An examples:
this doesnt work
SELECT field1 AS ABC, field2 AS XXX, field3 AS QQQ FROM mytable WHERE ABC =
'abc' ORDER BY ABC
this works
SELECT field1 AS ABC, field2 AS XXX, field3 AS QQQ FROM mytable WHERE
field1 =