------------------程序做得再好,数据有问题照样是个死 !

索引SQL

--索引:就是为了查询提高效率的。相当于一个引用,可以快速找到数据的位置
--聚集索引:索引的顺序就对应着内容的顺序,所以聚集索引意味着排序
--非聚集索引:索引的顺序和内容的顺序没有本质的关联
--语法:
--create clustered|nonclustered index IX_名称
--on 表(列)
if exists (select * from sysindexes where name='ix_studentname')
drop index student.ix_studentname
create nonclustered index ix_studentname
on student(studentname)

posted @ 2015-03-19 22:48  俊落笔如歌  阅读(148)  评论(0)    收藏  举报
           人的本事不是与生俱来的,不是你掌握了多少,而是当你面对一个未知问题的时候,你能用多少时间来掌握!       ---------俊落笔如歌