Re: selecting rows tagged with "a" but not "b"
| От | Andreas Kretschmer |
|---|---|
| Тема | Re: selecting rows tagged with "a" but not "b" |
| Дата | |
| Msg-id | 20100201141453.GA8857@tux обсуждение исходный текст |
| Ответ на | selecting rows tagged with "a" but not "b" (8q5tmkyqry@sneakemail.com) |
| Ответы |
Re: selecting rows tagged with "a" but not "b"
|
| Список | pgsql-sql |
8q5tmkyqry@sneakemail.com <8q5tmkyqry@sneakemail.com> wrote: > Hi, > > I have a two tables: > > article > articleID, name, content > > tags > articleID, tag > > I want to find all articles that are tagged with "a" but not "b" > > how do I do this? select a.* from article left join tags t on a.articleID=t.articleID where b.tag = 'a'; Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
В списке pgsql-sql по дате отправления: