*由于位数较多(年月学号)所以只能创建字符型索引
index on 年+月+学号 tag tg_name candidate && tg_name 换成你想要的名称
*如果年,月,学号不是字符型,如果不转换,会影响速度,但也可以用
index on str(年,4)+str(月,2)+str(学号,len_x) tag tg_name candidate
*len_x是学号的最大长度
你也可以分别对年,月,学号进行索引,而不用单独建立上面的索引,vfp同样可以优先(只要for语句中字段索引就可以)
sele * from test_dbf for 年=S_year and 月=S_month ... to ... order by 学号