Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 iOS 上有一个游戏数据库。我随机提取我的数据:
SELECT * FROM Questions WHERE Category IS 2 ORDER BY RANDOM() LIMIT 1
有没有办法检查以前出现的数据并且不再显示它?
您必须存储先前选择的行 ID 并将其从列表中排除。
SELECT * FROM (tablename) WHERE (rowname) IS (data) and (tablename.id) != (PreviousID) ORDER BY RANDOM() LIMIT 1