Web 中的重复数据 SQL
Duplicated data in Web SQL
如何让数据不重复 如何自动插入 id 行
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")');
});
你可以试试
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")');
});
如何让数据不重复 如何自动插入 id 行
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")');
});
你可以试试
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")');
});