第四章习题答案
9,replace 姓名 with m.姓名
10,5
13题
1) list for recno()=5 或
go 5
display
2) list all for recno()>=5 and recno()<=10 或
go 5
list next 6
3) list fields 姓名,出生年月 for 出生年月>={^1980/01/01}
4) list for 出生年月>={^1983/12/31} and 出生年月<={^1985/01/01}
5) go top
insert before
6) browse for recno()=reccount()
7) replace 入学成绩 with 入学成绩+20 for year(date())-year(出生年月)<16 and 少数民族否
8) copy to xsda
use xsda
delete all for mod(recno(),2)=0
pack
9) index on -入学成绩 tag cj
list next 5
10) count all for year(出生年月)=1985 to number
11) average year(date())-year(出生年月) for 性别="女"
average year(date())-year(出生年月) for 性别="男"
12) locate for 少数民族否
display
13) index on 学号 tag xh desc
index on 出生年月 tag cs
14) calculate max(出生年月) to x1
calculate min(出生年月) to x2
15) index on 性别 tag xb
total on 性别 to hz fields 入学成绩
14.一对一的关联:
use student
sele 2
use score
index on 学号 tag xh
sele 1
set rela to 学号 into b
brow
sele 2
brow

一对一的关联结果一对多的关联:
use student
sele 2
use score
index on 学号 tag xh
sele 1
set rela to 学号 into b
set skip to b
brow
sele 2
brow
一对多的关联结果