当前位置:网站首页>sqlite 查看表结构 android.database.sqlite.SQLiteException: table splitTable has no column named
sqlite 查看表结构 android.database.sqlite.SQLiteException: table splitTable has no column named
2022-07-31 05:15:00 【为今天而努力】
Sqlite 插入数据数据时提示没有该列:
android.database.sqlite.SQLiteException: table splitTable has no column named isLast (code 1):
此时可以查看该表的创建结构,然后调整列名称,重新调用插入的方法。
Cursor cursor = db.rawQuery("select * from sqlite_master where type= 'table' and name='" + tableName + "'", null);
/**
* 查询到结果对应的列名与位置
* 0 = "type"
* 1 = "name"
* 2 = "tbl_name"
* 3 = "rootpage"
* 4 = "sql"
**/
if (cursor.moveToNext()){
String sql = cursor.getString(cursor.getColumnIndex("sql"));
Log.d(TAG, "showCreateTable: sql " + sql);
}
边栏推荐
- leetcode-1833. 雪糕的最大数量(排序+贪心)
- 【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
- Xiaobai learns reptiles - introduction to reptiles
- Digital twins will be an important way to enter the "metaverse"
- gin框架学习-Casbin入门指南(ACL、RBAC、域内RBAC模型)
- Linux修改MySQL数据库密码
- sqlmap注入教程 常用指令
- What is an EVM Compatible Chain?
- this指向问题
- (Crypto必备干货)详细分析目前NFT的几大交易市场
猜你喜欢
![[Cloud Native] What should I do if SQL (and stored procedures) run too slowly?](/img/40/be3a30743ee2bc6c82f82ab852f29c.png)
[Cloud Native] What should I do if SQL (and stored procedures) run too slowly?

【JVM加载】---类加载机制

常见JVM面试题及答案整理

什么是 GameFi?

leetcode-每日一题735. 行星碰撞(栈模拟)

MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案

The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered

Eternal blue bug reappears

js中的全局作用域与函数作用域

Powershell中UTF-8环境中文乱码解决办法
随机推荐
js中的函数
对js的数组的理解
GUCCI, LV and other luxury giant universe how to layout yuan, other brands should keep up with?
理解js运算符
MySql to create data tables
【Elastic-Job源码分析】——作业监听器
NFTs: The Heart of Digital Ownership
2021 Mianjing - Embrace Change
How to distinguish big and small endian in C language
Build vulhub vulnerability shooting range on kali
MySQL分页查询的5种方法
Linux中mysql密码修改方法(亲测可用)
"limit" query in Oracle database
vulhub靶场学习日记SickOs1.2
[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]
小米手机短信定位服务激活失败
小白学爬虫——爬虫入门
什么是 GameFi?
动态规划(一)| 斐波那契数列和归递
[Cloud native] Simple introduction and use of microservice Nacos