syntax for access an alias in the where clause ? - Mailing list pgsql-sql

Hi !

It's long ago since I used SQL :-)

select [expression 1] as [alias 1], [expression 2] as [alias 2]
where [alias 1] < [alias 2]
order by [alias 2] - [alias 1]

---> ERROR:  Attribute '[alias 1]' not found

I found a lot of 'select [expression] as' but I've never seen somebody 
accessing the alias ... Can't this be done ?

M.





pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SQL performance issue with PostgreSQL compared to MySQL
Next
From: Wei Weng
Date:
Subject: Which one is faster?