--二、索引及主键的使用
--1.为上面创建的student表中的学号创建一个主键:用代码实现
alter table student
add constraint pk_stu primary key (sno)
/*2.为student表中的姓名创建唯一索引以加快查询速度:用代码实现*/
create unique index ix_name on student(sname)
--二、索引及主键的使用
--1.为上面创建的student表中的学号创建一个主键:用代码实现
alter table student
add constraint pk_stu primary key (sno)
/*2.为student表中的姓名创建唯一索引以加快查询速度:用代码实现*/
create unique index ix_name on student(sname)
微信扫码登录