I have a query that gives me the results of a join. I am interested in exploring the rows that are excluded from my result because they are the source of my data discrepancy. For example, table_1 has 20 rows and table_2 has 15 that join to table_1, how do I select the remaining 5 that are excluded from my result?
答案 0 :(得分:0)
I am guessing that you are using INNER JOIN which excludes rows with no match. If you will use FULL OUTER JOIN - then you will get rows that didn't match JOIN condition from both sides (there is also LEFT and RIGHT OUTER JOINs if you only want to explore one side).