How to use a query to pull out records which exist in one table but not the other

How can I use a query to pull out records which exist in one table but not the other?

An SQL Inner Join will only find records that DO match in both.
A Left or Right Join will pull out ALL records from one table.

Basically I have two identical structured tables, most records appear in both tables but table 2 has extra records and possibly a few records which, while existing in table 1, have been updated.

Hi

I’m not sure I understand the question correctly, sorry if not…

The following query selects records which exist in TableB and not in TableA:

SELECT "IdTable" FROM "TableB" WHERE "IdTable" NOT IN ( SELECT "IdTable" FROM "TableA" )

The following query updates field NbJours inTableA with value of same field in TableB when IDs match:

UPDATE "TableA" SET "NbJours" = (SELECT "NbJours" FROM "TableB" WHERE "TableA"."IdTable" =  "IdTable")

HTH

Regards