开发者

How to get unmatched records using SQL query?

开发者 https://www.devze.com 2022-12-27 09:52 出处:网络
Actually if i am doing INNER JOIN of two tables then i will开发者_Python百科 get all matched records from the two tables.

Actually if i am doing INNER JOIN of two tables then i will开发者_Python百科 get all matched records from the two tables. But i want to get all the unmatched rows only.

Is there any way to do that? Or Any JOIN available for that?


There is join you can use. You need an OUTER JOIN, and only select rows with a NULL on the join condition.

Another option is to use a sub query with a NOT EXISTS or NOT IN as part of your main WHERE clause.

0

精彩评论

暂无评论...
验证码 换一张
取 消