| От | finecur |
|---|---|
| Тема | query from a list of ids |
| Дата | |
| Msg-id | 1177449544.802557.4850@n35g2000prd.googlegroups.com обсуждение исходный текст |
| Ответы |
Re: query from a list of ids
Re: query from a list of ids |
| Список | pgsql-general |
Hi, Here is my first table: Table1 name| ids ------------------------- Peter| 2, 3, 4, 5 Jack| 100, 34, 3 Both name and ids are in text format. Here is my second table Table2 id | Flag | Title --------------------- 2 | Red | good 3 | Blue | poor 4 | Green| middle id is in integer (serial) format. I would like to list all the rows in table 2 where the id is in the ids field of peter. So I did select * from tables where id in (select ids from table1 where name='Peter') It did not work. How can I do the query? Thanks, ff
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера