how to use arrays?

Поиск
Список
Период
Сортировка
От Viorel Anghel
Тема how to use arrays?
Дата
Msg-id 19990203124936.E13507@zeus.advatech.ro
обсуждение исходный текст
Список pgsql-sql
Let's assume the following structure:
  create table T1 (name char(20), code int[]);
  insert into T1 values('abcd', '{1,2,3}');
  ...
  insert into T1 values('xyz', '{3,1}');

Now i want to select all names which contains code=1
SELECT name FROM T1 WHERE 1=T1.code[1] or 1=T1.code[2] ... etc ???

--
        ___
       <o-o>    Viorel ANGHEL <vang@altavista.net>
       [`-']
       -"-"-

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

Предыдущее
От: Claudius du Plessis
Дата:
Сообщение: subscribe pgsql-sql
Следующее
От: Sebestyen Zoltan
Дата:
Сообщение: ...