我有名为“SULP”的 sqlite 表,如下所示:
name year month day hour min ro
"SULP","12","7","7","0","0","2.41196" *
"SULP","12","7","7","0","0","2.39269"
"SULP","12","7","7","0","1","2.41117" *
"SULP","12","7","7","0","1","2.39198"
"SULP","12","7","7","0","2","2.41004" *
"SULP","12","7","7","0","2","2.39117"
"SULP","12","7","7","0","3","2.40914" *
"SULP","12","7","7","0","3","2.39043"
我不会删除由 * 标记的行
我努力了
delete from SULP
where exists (select * from 'SULP' as t2 WHERE t2.year=year
AND t2.month=month AND t2.day=day AND t2.hour=hour AND
t2.min=min and ro<>t2.ro order by rowid desc limit 1);
和
delete from 'SULP'
where exists (select * from 'SULP' as t2 WHERE t2.year=year
AND t2.month=month AND t2.day=day AND t2.hour=hour AND
t2.min=min AND rowid<t2.rowid);
但没有运气:(