I have Table A with the following values:
+------+------+ | ID1 | ID2 | +------+------+ | 1689 | 1709 | | 1709 | 1689 | | 1782 | 1709 | | 1911 | 1247 | | 1247 | 1468 | | 1641 | 1468 | | 1316 | 1304 | | 1501 | 1934 | | 1934 | 1501 | | 1025 | 1101 | +------+------+
and another relation (Table B) with the following values:
+------+------+ | ID1 | ID2 | +------+------+ | 1641 | 1468 | | 1911 | 1247 | +------+------+
I would like to delete all rows in Table A that appear in Table B (an exact match on ID1 and ID2). Seems simple in theory but I’m having no joy with the EXISTS statement or other approaches. I’m using SQLite.
Any suggestions greatly appreciated.
How about: (not too sure whether this works in SQLite)