If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I want a WHERE clause to be something like:
WHERE ID NOT IN ('v1','v2','v3',...) but I want the v1,v2,v3,... to be the result of a select from another table. Is this possible?
I want a WHERE clause to be something like:
WHERE ID NOT IN ('v1','v2','v3',...) but I want the v1,v2,v3,... to be the result of a select from another table. Is this possible?
Depends on your rdbms.
With most you can do this:
select a,b,c
from mytable
where id not in (select id from anothertable)