我是初学者.我学会了SQLite.我不懂函数db.execSQL(DATABASE_CREATE) ;
private static final String DATABASE_CREATE = "create table users (_id integer primary key autoincrement, " + "name text not null);";
Run Code Online (Sandbox Code Playgroud)
功能如此db.execSQL().怎么说的?请帮我.谢谢,
从Android SDK文档中SQLiteDatabase:
execSQL(String sql): Execute a single SQL statement that is NOT a SELECT or any other SQL statement that returns data.
在您的示例中,要创建表,您将调用db.execSQL(DATABASE_CREATE)哪个将在应用程序的SQLite数据库上执行表create语句.
| 归档时间: |
|
| 查看次数: |
8276 次 |
| 最近记录: |