Обсуждение: select

Поиск
Список
Период
Сортировка

select

От
"cristi"
Дата:
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.
How can I do that?

select * from table_name where cod = ????????





Re: select

От
Tom Lane
Дата:
"cristi" <cristi@dmhi.ct.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