首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

使用索引查询语句,该如何处理

2012-03-24 
使用索引查询语句如何使用索引查询成绩 谁给举个例子/*-使用索引查询学生考试成绩-*/select s.StudentName

使用索引查询语句
如何使用索引查询成绩 谁给举个例子

/*-使用索引查询学生考试成绩-*/
select s.StudentName,j.SubjectName,ExamDate,StudentResult from Student s
 inner join Result r on r.StudentNo=s.StudentNo
 inner join Subject j on j.SubjectNo=r.SubjectNo
where StudentResult between 80 and 90

[解决办法]
是不使索引不是自己决定的,你在where,group by,order by后面出现的字段建索引
查询优化器会自己处理

热点排行