Re: where cannot use alias name of column?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: where cannot use alias name of column?
Дата
Msg-id Pine.BSF.4.21.0109130722150.35960-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на where cannot use alias name of column?  (Giorgio Volpe <giorgio.volpe@gtngroup.it>)
Список pgsql-general
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.



В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: count of occurences PLUS optimisation
Следующее
От: "Jeff Eckermann"
Дата:
Сообщение: Re: where cannot use alias name of column?