On Thu, 13 Sep 2001, Giorgio Volpe wrote:

> May be it's my ignorance about sql ...
> but why cannot i use alias name of a column in a where clause?
> 
> # select key as cc from mytable where cc > 0;
> ERROR:  Attribute 'cc' not found

Because the select list (the key as cc part) isn't
evaluated until after the where clause determines
which rows to evaluate it for.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to