select
a.title,a.username,b.adddate
from
table
a,(
select
max
(adddate)
adddate
from
table
where
table
.title=a.title)
b
这里
select
max
(adddate)
adddate
from
table
where
table
.title=a.title就相当于一个临时表把
delete
from table1 where not exists ( select * from table2 where table1.field1=table2.field1 )
有条件删除