SQLserver--索引

来源:互联网 发布:西安java大数据招聘 编辑:程序博客网 时间:2024/05/17 09:34

---------创建非聚集索引------------
create nonclustered index IX_MyStudents_FEnglish on MyStudents(FEnglish)

-----------------创建唯一非聚集索引------------------------
create unique index AK_UnitMeasure_Name ON Production.UnitMeasure(Name);
---------------创建聚集索引---------------------
create table t1(a int, b int, c as a/b);
create unique clustered index Idx1 on t1(c);
insert into t1 values(1,0);

-------------删除索引-------------------
drop index 表名.索引字段

原创粉丝点击