Delete all rows that aren't in another table in SQLite

ricksea

New Member
I have two tables (A and B).I want to delete all the rows in Table B where B.1 isn't in Table A.2.So I wrote this formula in sqlite:\[code\]DELETE FROM B WHERE 1 IN (SELECT * FROM B LEFT JOIN A ON A.1=B.2 WHERE A.1 IS NULL)\[/code\]But this returns this error:\[code\]only a single result allowed for a SELECT that is part of an expression\[/code\]Could anyone give me a hand?Thanks.
 
Back
Top