我是這樣創(chuàng)建一個表的:char* contactstable = "create table contactslist(contactstableID integer primary key autoincrement,name VARCHAR, id VARCHAR, address VARCHAR,)";現(xiàn)在在插入數(shù)據(jù)之前需要檢查一下name是否重復,重復則replace或者不插入都行,請問應該用什么方法?
sqlite 如何設置唯一字段?
慕田峪4524236
2018-10-31 07:00:46