Re: psql question - Mailing list pgsql-general

From Scott Lamb
Subject Re: psql question
Date
Msg-id 1037381683.2848.2.camel@apt.slamb.org
Whole thread Raw
In response to psql question  (mtooker@magma.ca (Mark Tooker))
List pgsql-general
On Fri, 2002-11-08 at 18:10, Mark Tooker wrote:
>   SQL> select empno from emp where ((firstname,lastname) IN
>     2  (('John','Doe'),('Joe','Blow')));
>
>        EMPNO
>   ----------
>         1234

Cool, I'll have to try that sometime. Didn't know you could make tuples
out of values like that.

> Can anyone tell me what syntax _will_ work in psql?

I think you need to use and/or to duplicate that.

select    empno
from      emp
where     (firstname = 'John' and lastname = 'Doe')
   or     (firstname = 'Joe' and lastname = 'Blow');

Not as terse, but it works.

Scott


pgsql-general by date:

Previous
From: Aragorn
Date:
Subject: Basic Trigger Question
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: Poor Performance on large Tables