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.
当我插入一条记录时,会生成重复条目,这意味着总共显示两个相同的条目。我对 select 语句的查询如下:如何制作不同的记录???
Cursor cur = db.query("timer", null, null, null, null, null, null);
要进行不同的选择,请定义一个布尔变量,例如:
private boolean Distinct = true;
然后将您的查询更改为:
c = db.query(Distinct,DATABASE_TABLE,cols,null,null, null, null, null,null);