I want to write a store procedure to delete the records in Table A not in Table B. Table A and Table B have the same primary keys. Since both of them use multiple primary keys, the following code doesn't work correctly.
delete from A
where not exists
inner join A
A.k1= B.k1 and A.k2= B.k2 and
A.k3= B.k3 and A.k4= B.k4 and A.k5= B.k5 and A.k6 = B.k6