题解 | #对first_name创建唯一索引uniq_idx_firstname#
对first_name创建唯一索引uniq_idx_firstname
http://www.nowcoder.com/practice/e1824daa0c49404aa602cf0cb34bdd75
通过alter table来创建索引,要注意区分三种索引
1.key:普通索引,可有重复值,等同于index
2.unique:无重复值的索引,可有null
3.primary key:主键,无重复值的索引,无null
alter table actor
add unique uniq_idx_firstname(first_name),
add key idx_lastname(last_name)