Обсуждение: SELECT FROM SELECT

Поиск
Список
Период
Сортировка

SELECT FROM SELECT

От
"Aleksey V. Kurinov"
Дата:
Hi, All !!

Does Postrges provide "Select * from Select * from t1" construction ?

I use Postrges v.7.0.3 and get"ERROR:  parser: parse error at or near "select" response for such request.

Thanks, Leksey




Re: SELECT FROM SELECT

От
Tom Lane
Дата:
"Aleksey V. Kurinov" <leks@datanaut.com> writes:
> Does Postrges provide "Select * from Select * from t1" construction ?

In 7.1.

But you have to spell it per the SQL spec:
select * from (select * from t1) as foo;

The parentheses and alias name are not optional.
        regards, tom lane