Q: Get "DIFF" of database after a complex transaction I have a complex DB and I need to do the following: 
after a complex transaction, I need to make some sort of differential report between current database and a second one that repersents first database earlier state, to determine what was added.
There is no need to determine deleted data. I have eg 5-10 tables to compare. So I can do it one by one or all together.
What would be the best SQL expression to reach the goal?
Best, Askar

A: For tableX,
select current_db.tableX.id
from current_db.tableX
  left outer join earlier_db.tableX
    on current_db.tableX.id = earlier_db.tableX.id
where earlier_db.tableX.id is null

