摘要:
假如有一个表 testid name value1 a pp2 a pp3 b iii4 b pp5 b pp6 c pp7 c pp8 c iiiid是主键要求得到这样的结果id name value1 a pp3 b iii4 b pp6 c pp8 c iii方法1delete testwhere [id] not in (select max([id]) fromtestgroup by (name + value))方法2delete afrom testa left join(select (id) from testgroup by name,value)b on a.id=b. 阅读全文