SQL_231

对first_name创建唯一索引uniq_idx_firstname

https://www.nowcoder.com/practice/e1824daa0c49404aa602cf0cb34bdd75

方法一:

思路:

创建唯一索引:CREATE UNIQUE INDEX <唯一索引名> ON <表名> (<列名>);

创建一个简单的索引:CREATE INDEX <普通索引名> ON <表名> (<列名>);

代码:

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

全部评论

相关推荐

想玩飞盘的菠萝蜜在春...:上交✌🏻也拒?
点赞 评论 收藏
分享
评论
2
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务