Set Membership operator -- test group membership

Поиск
Список
Период
Сортировка
От Sophie Yang
Тема Set Membership operator -- test group membership
Дата
Msg-id 20050614190840.32862.qmail@web53706.mail.yahoo.com
обсуждение исходный текст
Список pgsql-novice
Say I have a table tbl1 with two columns:
   tbl1(a integer, b integer, c integer)

I want to select the rows in which a and b are members
of a list of integer pairs. The SQL in my mind is
something like:
  select * from tbl1 where (a, b) in ((1, 20), (2,
30), (3, 50));

I know the SQL above does not work in PostgreSQL. I
wonder what is the proper way to use in PostgreSQL. I
tried "select * from tbl1 where (a, b) in ('{{1, 20},
{2, 30}, {3, 50}}')", and it doesn't work either.

Thanks!
Sophie



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

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

Предыдущее
От: "Igor Katrayev"
Дата:
Сообщение: Re: [GENERAL] Set Membership operator -- test group membership
Следующее
От: rabt@dim.uchile.cl
Дата:
Сообщение: BIG files