可能重複:
Is it possible to apply primary key on the text fields in android database如何將主鍵添加到android sqlite中的文本數據類型?
我都喜歡這些讓部隊密切完成。
private static final String CREATE_NEWCUSTOMER = "create table newcustomer (_id integer primary key autoincrement, "
+ "cname text primary key, date text , " + "caddress text);";
它工作的整數,如果有任何想法,請幫助我。
看到這個:http://stackoverflow.com/questions/7591492/is-it-possible-to-apply-primary-key-on-the-text-fields-in-android-database – 2012-02-08 13:51:05