0

我想使用 SQLite 从表中删除最旧的记录,所以我应该使用条件(最低 id)还是有其他补救措施

4

1 回答 1

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)
于 2012-04-23T15:11:17.907 回答