Select rows when all all ids of its children records matches

Поиск
Список
Период
Сортировка
От Arup Rakshit
Тема Select rows when all all ids of its children records matches
Дата
Msg-id FF55BC81-BB56-45C3-BCA2-B7D0F8E81F4A@zeit.io
обсуждение исходный текст
Ответы Re: Select rows when all all ids of its children records matches
Список pgsql-general
I have a table posts(id, name), posts_tags(post_id, tag_id) and tags (id, name) ... I want to get all posts which has tag id 1, 2 and 3 for example. How should I do this? I tried ALL, but it didn’t work.

Those tag ids comes from UI by users, so I am looking for generic approach.


Thanks,

Arup Rakshit



В списке pgsql-general по дате отправления:

Предыдущее
От: Ron
Дата:
Сообщение: Re: PG9.1 migration to PG9.6, dump/restore issues
Следующее
От: Ron
Дата:
Сообщение: Re: Select rows when all all ids of its children records matches