2017-03-18 10 views
0

어떻게 데이터 이제까지 ID 행이 automaticlly 찾을중복 데이터

db.transaction(function (tx) { 
    tx.executeSql('CREATE TABLE IF NOT EXISTS logins (Username, Password)'); 
}); 
db.transaction(function (tx) { 
    tx.executeSql('INSERT INTO logins VALUES ("Ahmed","123")'); 
    tx.executeSql('INSERT INTO logins VALUES ("Ahmed","123")'); 
}); 

답변

0

삽입 당신은

db.transaction(function (tx) { 
    tx.executeSql('CREATE TABLE IF NOT EXISTS logins (Username UNIQUE, Password)'); 
    tx.executeSql('INSERT INTO logins VALUES ("Ahmed","123")'); 
    tx.executeSql('INSERT INTO logins VALUES ("Ahmed","123")'); 
}); 
을 시도 할 수있는 방법을 중복되지 수 있습니다