删除一个表table1中的数据,where条件是table1的某几列=table2的某几列,该如何写sql?delete from table1 
where table1.id = table2.id
  and table1.code = table2.code