Skip to content
Advertisement

Filter out entire records SQL

I have two tables: TableA and TableB

TableA Has 10 records while TableB has 8 Records.

I am trying to filter the distinct records on table B from TableA so I can then move the discrepancy to TableB.

This is a Legacy, poorly made, Database, so there is no Unique Identifiers. So they look something like this.

I want to filter the combination of values for each record on TableB to find the missing values that are present on TableA

Advertisement

Answer

You need a left join from tablea to tableb and get only the rows of tablea that do not match:

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