在sql语句中设置好条件
然后
查询该条件下的 符合条件的数量
例如
private boolean isCurrentTextExist(Integer id) {
int count = DBHelper.executeCount("select count(*) from text where id = ?", id);
if(count>0) return true;
return false;
}
DBHelper 为自己的封装数据库执行类
在sql语句中设置好条件
然后
查询该条件下的 符合条件的数量
例如
private boolean isCurrentTextExist(Integer id) {
int count = DBHelper.executeCount("select count(*) from text where id = ?", id);
if(count>0) return true;
return false;
}
DBHelper 为自己的封装数据库执行类