
表名:rejectgoods 判断字段:name,size,city,address UpdateTime 是 datetime 类型
表内所有条目,根据判断字段都相同的条目,如果存在>1 条,只保留 UpdateTime 最新的条目,其它删除。。。
1 kiracyan 2020-08-31 18:49:22 +08:00 select rid from rejectgoods t1 exists (select 1 from rejectgoods where t1. name = t2.name ..... and t1.address = t2. address and t1.updatetime < t2.updatetime ) 把查出来的 rid 删了 |
2 LGA1150 2020-08-31 20:24:04 +08:00 via Android |
3 uti6770werty OP |
4 gavindexu 2020-09-01 05:57:54 +08:00 via iPhone 给中文的字段名前后加上“`”就可以了啊 |