Re: Possible to create a *really* virtual table ?

Поиск
Список
Период
Сортировка
От Denis Bucher
Тема Re: Possible to create a *really* virtual table ?
Дата
Msg-id 5.1.0.14.0.20011106132134.02840690@mail.niftycom.com
обсуждение исходный текст
Ответ на Possible to create a *really* virtual table ?  (Denis Bucher <dbucher@niftycom.com>)
Список pgsql-sql
At 15:02 05.11.01 +0100, you wrote:

Hello !

>Is it possible to create a virtual table, NOT a view ?
>
>For example :
>SELECT *
>FROM
>(VALUES ('orange', 'orange'), ('apple', 'red'),
>('banana', 'yellow'))
>AS Fruits_And_Colors(fruit, color);
>I.e. to do a request on a non-real table ?
>I want to have the following virtual table :
>TABLE b
>id   |   b
>------------
>1    |   't'
>2    |   'f'
>
>Is it possible in PostgreSQL ?

Ok I found the answer, it is possible !

SELECT text 'a' AS "Text" UNION SELECT 'b';

Denis



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

Предыдущее
От: David Stanaway
Дата:
Сообщение: Re: select from a dynamic table name
Следующее
От: "Ligia Pimentel"
Дата:
Сообщение: Left join error