Discuss / SQL / 继续秃头

继续秃头

Topic source

清竹.

#1 Created at ... [Delete] [Delete and Lock User]

UNIQUE关键字:

ALTER students

创建唯一索引且具有唯一性约束:

ADD UNIQUE INDEX uni_name (name);

不创建唯一索引但是具有唯一性约束:

ADD CONSTRAINT uni_name UNIQUE (name);

添加索引:

ALTER students

ADD INDEX uni_score (score);


  • 1

Reply