Re: select

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "cristi" <cristi(at)dmhi(dot)ct(dot)ro>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: select
Date: 2003-03-10 14:55:15
Message-ID: 17213.1047308115@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"cristi" <cristi(at)dmhi(dot)ct(dot)ro> writes:
> I have an integer vector: 101,105,120... and a table with an integer field
> named "cod" .
> I want to select the records who contains in field named "cod" one of the
> vector values.

SELECT * FROM table_name WHERE cod IN (101,105,120...);

regards, tom lane

In response to

  • select at 2003-03-10 07:50:16 from cristi

Browse pgsql-novice by date

  From Date Subject
Next Message bryan 2003-03-10 14:57:17 Value of sequence last inserted
Previous Message Vittorio Zuccala' 2003-03-10 14:05:58 Re: Pgaccess doesn't connect