create TABLE c:\xsk(xh c(8),xm c(8),xb c(2),csrq d)
insert into xsk(xh,xm,xb,csrq) values('20020101','李小飞','男',{^1982-07-08})
insert into xsk(xh,xm,xb,csrq) values('20020201','王美英','女',{^1983-05-01})
insert into xsk(xh,xm,xb,csrq) values('20020102','张欣','女',{^1983-09-20})
insert into xsk(xh,xm,xb,csrq) values('20020303','王小平','男',{^1984-08-06})
insert into xsk(xh,xm,xb,csrq) values('20020204','赵丽娟','女',{^1981-08-01})
insert into xsk(xh,xm,xb,csrq) values('20020301','高军','男',{^1983-10-25})
BROWSE
use
set talk off
clear
dimension a(2)
use c:\xsk excl in 0
brow
?xh,xm,xb,'use'
index on xm to ixm
brow
?xh,xm,xb,'index'
go 3
?xh,xm,xb,'go 3'
SKIP
?xh,xm,xb,'skip'
scatter to a
?xh,xm,xb,'scatter'
go top
?xh,xm,xb,'go top'
gather from a
?xh,xm,xb,'gather'
use
set talk on
return
我测试结果是 ,赵丽娟,可能和排序有关系
CREATE前的排序为
INDEX的排序为
运行结果
insert into xsk(xh,xm,xb,csrq) values('20020101','李小飞','男',{^1982-07-08})
insert into xsk(xh,xm,xb,csrq) values('20020201','王美英','女',{^1983-05-01})
insert into xsk(xh,xm,xb,csrq) values('20020102','张欣','女',{^1983-09-20})
insert into xsk(xh,xm,xb,csrq) values('20020303','王小平','男',{^1984-08-06})
insert into xsk(xh,xm,xb,csrq) values('20020204','赵丽娟','女',{^1981-08-01})
insert into xsk(xh,xm,xb,csrq) values('20020301','高军','男',{^1983-10-25})
BROWSE
use
set talk off
clear
dimension a(2)
use c:\xsk excl in 0
brow
?xh,xm,xb,'use'
index on xm to ixm
brow
?xh,xm,xb,'index'
go 3
?xh,xm,xb,'go 3'
SKIP
?xh,xm,xb,'skip'
scatter to a
?xh,xm,xb,'scatter'
go top
?xh,xm,xb,'go top'
gather from a
?xh,xm,xb,'gather'
use
set talk on
return
我测试结果是 ,赵丽娟,可能和排序有关系
CREATE前的排序为
INDEX的排序为
运行结果