Skip to content

SQL select from Table1 that has no value in Table2

I have two tables with the following data:

Table 1:

Table 2:

Then I used a join for this Table 3:

I need to get the row with 101 – 204 – A and 102 – 213 – A.

Data is available in Table 1 but has no data aligned in Table 2.

Is there a way to get this?

PS: This is dummy data.

Advertisement

Answer

You can use a left join and select only the records having null in the right table in some column which shouldn’t be null if there was a corresponding record.

User contributions licensed under: CC BY-SA
3 People found this is helpful