Re: Multiple IN
От | Josh Berkus |
---|---|
Тема | Re: Multiple IN |
Дата | |
Msg-id | web-525488@davinci.ethosmedia.com обсуждение исходный текст |
Ответ на | Multiple IN (Leandro Fanzone <leandro@hasar.com>) |
Список | pgsql-novice |
Leandro, > Maybe this is a silly question. I have a table t with two fields f1 > and > f2. Those fields together form the primary key. I want to select a > list > of pairs from that table. The simplest SQL clause would be > > SELECT * FROM t WHERE (f1 = v1 AND f2 = v2) OR (f1 = v3 AND f2 = v4) > ...; We'll need database schema (table designs) if you want us to help you. The above isn't enough information to go on. For example, where did "v1" come from? Is this a field? An interface language variable? Please be explicit! Also, consider picking up Joe Celko's SQL for Smarties, reviewed at http://techdocs.postgresql.org/bookreviews.php -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
В списке pgsql-novice по дате отправления: