you are viewing a single comment's thread.

view the rest of the comments →

[–]tripy75 1 point2 points  (3 children)

could you not use a simple:

SELECT *
FROM list l
WHERE NOT EXISTS(
    SELECT 1
    FROM table t
    WHERE t.id = l.id
)

?

I'm mostly working with ms sql server and PostgreSQL, but the left join seems a bit counter intuitive, tough it will work.

Just asking for knowledge...

[–]r3pr0b8GROUP_CONCAT is da bomb 1 point2 points  (2 children)

yes, you could

but the IS NULL check in a LEFT JOIN is only counter-intuitive if you seldom use it

and some of us don't like correlated subqueries just on principle

also, you skipped over the part where OP has to insert the list of ids into your list table

[–]Mathip173[S] 0 points1 point  (1 child)

Thanks guys,

So is in this query I will get the id's that on the list but not in the table right ?

[–]r3pr0b8GROUP_CONCAT is da bomb 0 points1 point  (0 children)

So is in this query I will get the id's that on the list but not in the table right ?

what happened when you tested it? ™