标签: android database sqlite android-room
如何使用会议室持久性库“创建触发器”
CREATE TRIGGER IF NOT EXISTS delete_till_10 INSERT ON user WHEN (select count(*) from user)>9 BEGIN DELETE FROM user WHERE id IN (SELECT id FROM user ORDER BY id limit (select count(*) -9 from user)); END