try{
DaoSession session=MyApplication.getInstances().getDaoSession();
String sql = "update sqlite_sequence SET seq = 0 where name ='TableName'";//自增长ID为0
session.getDatabase().rawQuery(strSql,null);
}catch(Exception e){
}
try{
DaoSession session=MyApplication.getInstances().getDaoSession();
String sql = "update sqlite_sequence SET seq = 0 where name ='TableName'";//自增长ID为0
session.getDatabase().rawQuery(strSql,null);
}catch(Exception e){
}
本文标题:greendao重置表的自增长主键
本文链接:https://www.haomeiwen.com/subject/cedvkqtx.html
网友评论