2012-04-23 57 views
0

我想删除表使用SQLite的最古老的记录,因此我应该使用的条件(最低ID),最早的记录,或有其它补救删除使用SQLite

回答

2
delete from table1 as a where a.id = (select min(id) from table1) 

,或者如果你已经保存日期你可以做

delete from table1 as a where a.[date]= (select min([date]) from table1)