querying arrays

Поиск
Список
Период
Сортировка
От Heiko Wilms
Тема querying arrays
Дата
Msg-id 37413B01.48BABC87@stud.fh-hannover.de
обсуждение исходный текст
Список pgsql-sql
Hi,

I stucked upon the following situation:
create table test (   n    int[]   );

insert into test values (
   '{1,2,3,4}'

);

now I need a query that returns all four numbers in different variables,i.e.

an array like n[1],...,n[4]

I tried queries like
   select test.n from test which returns {1,2,3,4}

or
   select test.n[i] from test,  where i is 1,2,3 or 4 which each returns 1,2,...

What I'm looking for is a query that returns four rows with one number in each

result index. Can anyone help?

--
H. Wilms

Homepage schering.si2.uni-hannover.de/hugo
email    wilms@stud.fh-hannover.de





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

Предыдущее
От: Ivanko Alexandr
Дата:
Сообщение: (no subject)
Следующее
От: nourry@ensinfo.univ-nantes.fr (Frederic Nourry)
Дата:
Сообщение: Re: Retrieving column names and table names of a database