Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain how to get unmatched records from two tables in SQL?

1 Answer

0 votes
by (119k points)
edited by

‘IN’ operator can be used to get the unmatched records from two tables in SQL and the following query is for that:

SELECT TableA.id

FROM TableA

WHERE TableA.id NOT IN (

                                                   SELECT TableB.id

                                                  FROM TableB

                                                  )

If you want to learn SQL from top experts, you can check out this SQL Training course by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Apr 29, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Apr 20, 2020 in SQL by Sudhir_1997 (55.6k points)

Browse Categories

...