db2.execSQL("Create Table StudentElective1(studentid text UNIQUE,
elective1 text ,elective2 text ,year text)");
if ((db2.insert("StudentElective1", null, values))!=-1) {
Toast.makeText(eigth.this, "Elective Successfully Selected", 2000).show();
} else {
Toast.makeText(eigth.this,
"Insert Error,Elective already selected", 2000).show();
}
如何在插入查询中指定where条件?在android中的sqlite插入查询
如何使用更新而不是插入?请说一些例子..刚接触到android – Suji 2012-03-24 08:44:15
@Suji我修改了我的回答,给出了Android中的update子句的例子 – 2012-03-24 12:32:39