当前位置:网站首页>Android uses sqliteopenhelper to flash back
Android uses sqliteopenhelper to flash back
2022-07-04 18:10:00 【Blue static cloud】
problem :
I'm sure I'm right , however app Just keep dodging
Try :
Delete app, reinstall
Example :
@Override
public void onCreate(SQLiteDatabase db) {
// If there is group surface , Then delete the table
String drop_sql = "DROP TABLE IF EXISTS " + CHAT_GROUP + ";";
db.execSQL(drop_sql);
// establish group surface
String create_sql = "CREATE TABLE IF NOT EXISTS " + CHAT_GROUP + "("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT,"
+ "group_id VARCHAR NOT NULL,"
+ "chat_type INTEGER DEFAULT NULL"
+ ");";
db.execSQL(create_sql);
}
Add a new field id, Rerun fetch id Print , Flash back
String sql = String.format("select id,group_id,update_time" +
" from %s where %s;", CHAT_GROUP, condition);
onCreate Timing of invocation
边栏推荐
- 【Hot100】32. Longest valid bracket
- Just today, four experts from HSBC gathered to discuss the problems of bank core system transformation, migration and reconstruction
- 一直以为做报表只能用EXCEL和PPT,直到我看到了这套模板(附模板)
- 国产数据库TiDB初体验:简单易用,快速上手
- 我写了一份初学者的学习实践教程!
- To sort out messy header files, I use include what you use
- 【HCIA持续更新】WLAN工作流程概述
- 大厂面试总结大全二
- Developers, MySQL column finish, help you easily from installation to entry
- 俄罗斯 Arenadata 发布基于PostgreSQL的产品
猜你喜欢

要上市的威马,依然给不了百度信心

With an estimated value of 90billion, the IPO of super chip is coming

wuzhicms代码审计

CocosCreator事件派發使用

Cocoscreator event dispatch use

Just today, four experts from HSBC gathered to discuss the problems of bank core system transformation, migration and reconstruction

超标量处理器设计 姚永斌 第5章 指令集体系 摘录

数学分析_笔记_第7章:多元函数的微分学

To sort out messy header files, I use include what you use

TCP两次挥手,你见过吗?那四次握手呢?
随机推荐
The controversial line of energy replenishment: will fast charging lead to reunification?
[test development] software testing - Basics
Offline and open source version of notation -- comprehensive evaluation of note taking software anytype
With the stock price plummeting and the market value shrinking, Naixue launched a virtual stock, which was deeply in dispute
2022年全国CMMI认证补贴政策|昌旭咨询
【209】go语言的学习思想
About the pit of firewall opening 8848 when Nacos is started
【HCIA持续更新】网络管理与运维
股价大跌、市值缩水,奈雪推出虚拟股票,深陷擦边球争议
超标量处理器设计 姚永斌 第5章 指令集体系 摘录
The money circle boss, who is richer than Li Ka Shing, has just bought a building in Saudi Arabia
Why are some online concerts always weird?
Talk about seven ways to realize asynchronous programming
【Hot100】31. 下一个排列
Wuzhicms code audit
Initial experience of domestic database tidb: simple and easy to use, quick to start
超标量处理器设计 姚永斌 第6章 指令解码 摘录
Rainfall warning broadcast automatic data platform bwii broadcast warning monitor
DB-Engines 2022年7月数据库排行榜:Microsoft SQL Server 大涨,Oracle 大跌
爬虫初级学习