【发布时间】:2021-12-17 20:06:06
【问题描述】:
例如,如果我做一个像这样的表
db.execSQL("create table myTable (" + "id integer primary key autoincrement," + "title text," + "isImportant numeric" + ");");
想要获得“头衔”,我愿意
String result;
Cursor c...;
int titleIndex = c.getColumnIndex("title");
do
...
result = c.getString(titleIndex);
...
while (c.moveToNext());
与 c.getInt、c.getDoule 等相同。但没有 c.getBoolean。那么如何从该表中获取“isImportant”的值?
【问题讨论】:
标签: java android sqlite boolean android-sqlite