delete a where a.id in (select b.id from a,b where a.id=b.id) //括弧里的意思是找出a.id=b.id记录,然后把记录用IN关键字,SELECT 后面更b.id和a.id的效果应该是一样。 and a.date<=to_date('20001231','yyyymmdd')
delete a where (a.id in (select b.id from a,b where a.id=b.id) ) and (a.date<=to_date('20001231','yyyymmdd')
只好帮助你UP一下啦。
where a.id in (select b.id from a,b where a.id=b.id)
//括弧里的意思是找出a.id=b.id记录,然后把记录用IN关键字,SELECT 后面更b.id和a.id的效果应该是一样。
and a.date<=to_date('20001231','yyyymmdd')
where (a.id in (select b.id from a,b where a.id=b.id) )
and (a.date<=to_date('20001231','yyyymmdd')
明天再来结分