jaynesh — 2011-08-19T05:52:43-04:00 — #1
I have two tables
(post_id user_id post)
The post table contains all the posts submitted by the users.
The hide table contains all the posts that are to be hidden from the output.
How do I not display the posts that are in the hide table?
r937 — 2011-08-19T06:07:00-04:00 — #2
with a WHERE NOT EXISTS subquery
jaynesh — 2011-08-19T06:20:19-04:00 — #3
I'm already using a WHERE in my query. Can I use WHERE NOT EXISTS as well?
r937 — 2011-08-19T06:22:35-04:00 — #4
you would use WHERE something AND NOT EXISTS ( subquery )
oddz — 2011-08-19T13:48:33-04:00 — #5
p.post_id = h.post_id
h.post_id IS NULL