delete from table a where rowid <> (select max(rowid) from table b where a.fiedName1= b.paysysbankcode ... );