SQLITE 创建唯一索引不重复

180it 2019-10-29 AM 6651℃ 0条

号码字段为唯一索引不重复项

PRAGMA foreign_keys = false;
DROP TABLE IF EXISTS "DBTABLE";
CREATE TABLE "DBTABLE" (
"ID" integer PRIMARY KEY AUTOINCREMENT,
"号码" string(15) NOT NULL,
"密码" string(15) NOT NULL
);
CREATE UNIQUE INDEX "号码"
ON "DBTABLE" (
"号码" ASC
);
PRAGMA foreign_keys = true;

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

SQLITE 创建唯一索引不重复