Re: [GENERAL] IN/NOT IN operators - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] IN/NOT IN operators
Date
Msg-id 199810020156.VAA22849@candle.pha.pa.us
Whole thread Raw
In response to IN/NOT IN operators  ("Sergei Chernev" <ser@nsu.ru>)
List pgsql-general
[Charset koi8-r unsupported, filtering to ASCII...]
> Hello,
> I want to ask you if there are the way to do:
> select * from aa where (bb, ff) IN ((2,3),(4,5));
> ERROR:  parser: parse error at or near "2"    :((
>
> I see that it works with subselect:
> select * from aa where (bb, ff) IN (select (bb,ff) from zz);
>
>
> Thank you,
> ---------------------------
> Sergei Chernev
> Internet: ser@nsu.ru
> Phone: +7-3832-397354
>
>
>

select * from aa where (bb, ff) IN
        (
            select 2,3
            union
            select 4,5
        )

Does this work?


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


pgsql-general by date:

Previous
From: "Taral"
Date:
Subject: Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)