SQL SERVER T_SQL 索引使用方法

Oracle PLSQL 里的索引记得是这样的:/*++index(index_name)*/

Select /*+INDEX(BSEMPMS SEX_INDEX) USE SEX_INDEX BECAUSE THERE ARE FEWMALE BSEMPMS */ FROM 
BSEMPMS Where SEX='M';

SQL SERVER T-SQL里却是这样的。以前真没接触过

select * from stumarks (index = stumarks.IX_Stumarks_LabExam)
  where labexam between 60 and 90

而在高版本中不支持上述写法

select * from stuMarks with(index='stumarks.IX_StuMarks_LabExam')
     where labExam between 60 and 90


你可能感兴趣的:(SQL SERVER T_SQL 索引使用方法)