开发者

How to get unmatched records using SQL query?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜