CREATE UNIQUE INDEX uniq_idx_firstname ON actor(first_name);
CREATE INDEX idx_lastname ON actor(last_name);
注意第一句句末要用分号隔开
或者:
ALTER TABLE actor ADD UNIQUE uniq_idx_firstname(first_name);
ALTER TABLE actor ADD INDEX idx_lastname(last_name);
ALTER TABLE:修改数据库表结构
本题考查数据表格插入唯一索引和普通索引的使用(有两种用法)