首页 > 技术文章 > mysql增加索引

ai594ai 2022-01-21 10:13 原文

 

对first_name创建唯一索引uniq_idx_firstname,对last_name创建普通索引idx_lastname

CREATE UNIQUE INDEX uniq_idx_firstname ON actor(first_name);
CREATE INDEX idx_lastname ON actor(last_name);

 

推荐阅读