Skip to content
Advertisement

How to substract Table1 values from Table2?

Table1 contains ColumnA, Table2 contains ColumnA and ColumnB.

How do I remove(delete) rows in Table2 that contain ColumnA values in both tables?

Advertisement

Answer

Delete rows from table2 where the ColumnA value is also found in table1:

delete from table2
where ColumnA in (select ColumnA from table1)
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement