我已经做了这样的力量关闭.
private static final String CREATE_NEWCUSTOMER = "create table newcustomer (_id integer primary key autoincrement, "
+ "cname text primary key, date text , " + "caddress text);";
Run Code Online (Sandbox Code Playgroud)
它适用于整数,如果有任何想法请帮助我.
您不会在SQLite中创建类似主键.我没有测试过以下内容,但根据文档它应该可以工作:
private static final String CREATE_NEWCUSTOMER = "create table newcustomer (_id integer autoincrement, cname text, date text, caddress text, PRIMARY KEY(_id, cname));";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8759 次 |
| 最近记录: |