[Solved] SQL – can we combine AND operator and NOT IN?

[ad_1]

Whether or not this is possible depends on the database server you use. Some databases (eg PostgreSQL) support row values, which allow you to do this:

where (x, y) in (select colX, colY from ....)

Otherwise you can do something like

where exists (select 1 from ... where colX = x and colY = y)

[ad_2]

solved SQL – can we combine AND operator and NOT IN?