您的位置:首页 > 数据库

sql 索引(index)

2010-11-07 23:50 465 查看
--------------------------------
---------索引操作---------------
--------------------------------
use stuDB
go
--创建索引
if exists (select * from sysindexes where [name] ='ix_stuMarks_writtenExam' )
drop index stuMarks.ix_stuMarks_writtenExam
--create unique(唯一索引)、clustered(聚集索引)、nonclustered(非聚集索引)
create nonclustered index ix_stuMarks_writtenExam
on stuMarks (writtenExam)
with fillfactor=30--索引页填满的空间所占百分比
go

select * from stuMarks
with(index=ix_stuMarks_writtenExam)
where writtenExam>60
go
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql index