请指导我。如何以这种方式将两列定义为主键。
$scope.$on("modalClosing",function(event,value){
console.log(value); //value should be $scope.editMade
});
由于
答案 0 :(得分:2)
你可以试试这个 -
CREATE TABLE tablename (
column1,
column2,
PRIMARY KEY (column1, column2)
);
答案 1 :(得分:1)
应分别声明多个主键。查询以问题格式编写。
"CREATE TABLE IF NOT EXISTS " + TABLE_ATTENDEE +
" (" + COLUMN_Att_Event_ID + " TEXT," +
COLUMN_Att_Email + " TEXT, PRIMARY KEY(" + COLUMN_Att_Event_ID + "," + COLUMN_Att_Email + "))"
如果表只有一个PRIMARY KEY,那么
"CREATE TABLE IF NOT EXISTS " + TABLE_ATTENDEE +
" (" + COLUMN_Att_Event_ID + " TEXT PRIMARY KEY," +
COLUMN_Att_Email + " TEXT"