VFP程序设计实践教程习题部分参考答案重大出版社Word文档下载推荐.docx
- 文档编号:22155982
- 上传时间:2023-02-02
- 格式:DOCX
- 页数:30
- 大小:39.39KB
VFP程序设计实践教程习题部分参考答案重大出版社Word文档下载推荐.docx
《VFP程序设计实践教程习题部分参考答案重大出版社Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《VFP程序设计实践教程习题部分参考答案重大出版社Word文档下载推荐.docx(30页珍藏版)》请在冰豆网上搜索。
68.(B)69.(D)70.(D)71.(C)72.(A)73.(B)74.(D)75.(D)
76.(D)77.(A)78.(A)79.(A )80.(C)81.(B)82.(D)83.(C)
84.(C)85.(A)86.(B)87.(B)88.(D)89.(C)90.( C)91.(D)
92.(A)93.(A)94.(B)95.(C)96.(B)97.(B)98.(B)
99.(B)100.(B)101.(D)102.(C)103.(B)104.(D)
105.(A)106.(C)107.(D)108.(C)109.(A)110.(B)
111.(A)112.(D)113.(C)114.(B)
二、判断题(正确打√,错误打×
1.(×
)2.(×
)3.(√)4.(×
)6.(√)
1..F.2.403.-1和-24.逻辑运算符
5.命令?
VAL(SUBSTR("
668899"
,5,2))+1的执行结果是100。
6.D7.“456123789”8.T=Y+"
年"
+M+"
月"
+D+"
日"
9.-810.函数
11.STORE学分TOM.学分12.8B、8B、1B、8B和8B
13.A!
=B、A#B和A<
>
B14.1,26
15.日期型、逻辑型、日期时间型16."
关系数据库"
17.6
18.619.123.0020.5.1421..F.22.123.字段变量
24.TOPRINTER25.C26.C、N、D、L、Y和T
27.SETEXACTON28.ROUND(45.39748,3)29.2^20和2**20
30.-231.68和-23131.SETCENTURYON32.500.8965
33.存储于内存变量中的值的类型34.STORE0TODG或DG=0
35.38和.F.36.STORE0TOX,Y37..T.38.D和C
39.VAL()和STR()40..F.41.年龄>
=20AND年龄<
=60
42.是和是43."
□□AB□□CD"
和"
AB□□CD"
44."
奔腾586个人计算机"
45.MOD(INT(586/10),10)。
46..T.和.T.47..F.48.2和“8886”
49.?
"
A+B="
+STR(A+B,2)50.5和-651..T.,.F.
52.1553.D和C54.1,.F.
55.
(1).T.
(2).T.(3).T.(4).T.
56.
(1)old<
15ANDhight>
=1.8
(2)old<
=45ANDAI="
副教授"
ORold<
=35ANDAI="
讲师"
(3)math>
85ANDphysic>
85ANDenglish>
85ORmath+physic+english>
270
57..T.;
.T.;
353.00;
.F.;
.F.
58.Y;
266.35;
中国------北京"
59.10/11/06;
Sunday;
D;
3;
C;
8;
20;
48;
60;
2046
60..F.;
9;
“院软件94计算机学院软件”。
61.SETDATETOYMD;
SETCENTURYON;
?
DATE();
CDOW(DATE());
TIME()
62.
(1)left(a,7)+stuff(subs(a,8,6),1,6,"
FoxPro"
)+subs(a,14,8)+stuff(subs(a,22,8),1,8,"
DataBase"
)+subs(a,30)
(2)MOD(LEN(A),5)(3)REPLICATE("
-"
3)+A+REPLICATE("
3)
(4)STUFF(A,8,1,chr(ASC(SUBSTR(A,8,1))-1))
63._____208520.45____________64._____255____,___127_____
65.___下划线____66.____ABIJLM___67.____22_____,___14____
68._____A*B**2+E^y_________。
2.3.2习题
一、选择题
1.(D)2.(B)3.(B)4.(A)5.(C)6.( A)7.(B)8.(D)9.(B)
10.(C)11.(A)12.(A)13.(B)14.(A)15.(A)16.(A)17.(C)
18.(D)19.(D)20.(B)21.(A)22.(D)23.(B)24.(C)25.(B)
26.(B)27.(D)28.(C)29.(B)30.(A)31.(C)32.(D)
33.(D)34.(B)35.(D)36.(B)37.(D)38.(B)39.(A)
40.(B)41.(C)42.(B)43.(B)44.(C)45.(A)46.(C)47.(C)
48.(B)49.(B)50.(A)51.(D)52.(A)53.(B)54.(A)55.(B)
56.(C)57.(D)58.(D)59.(B)60.(C)61.(C)62.(C)
63.(C)64.(D)65.(B)66.(C)67.(C)68.(B)69.(D)
70.(D)71.(B)72.(A)73.(A)74.(D)75.(C)76.(C)
77.(A)78.(C)79.(B)80.(B)81.(D)82.(A)83.(B)
84.(B)85.(C)86.(B)87.(A)88.(B)89.(C)90.(C)
91.(A)92.(A)93.(A)94.(A)95.(A)96.(D)97.(A)
98.(A)99.(B)100.(C)101.(B)102.(B)103.(B)
104.(D)105.(D);
(D)106.(D)107.(D)108.(B)109.(A)
110.(B)111.(B)112.(D)113.(D)114.(D)115.(B)
116.(C)117.(D)118.(B)119.(D)120.(D)121.(B)
122.(C)123.(C)124.(D)125.(B)126.(B)127.(C)
128.(C)129.(A)130.(D)
1.102.SCATTER3.字段名、字段类型、宽度和小数位数
4.字母、汉字,105.327676.立即输入和追加输入
7.LISTFOR性别="
男"
和DISPFOR性别="
8.DELETENEXT49._自由表____10._REMOVE____11.___254___
12.__.CDX___13.__字段____14.___表__15.INSERTBEFORE16.__多对多___
17.__MODIFYDATABASE____18.____BROWSE____19.___DELETE__20.__修改__
21.___双击__22.____文件结束____23.物理,逻辑24.__一___
25.___SEEK___26.__父表___,__子表__
27.__主索引__、__候选索引__、_惟一索引__和__普通索引_
28.LOCATE29.___2号工作区____30.__文件结束__
31.___LISTNEXT5_____,__GO13____,LISTNEXT4__
32._LISTFORYEAR(进馆日期)>
=2000__33.__5__
34.
(1)__一车间2230.00600.00______
(2)__890_____
(3)__1001程云____,____1400______,___唐尊_____
(4)_____840__________
35.
2,
.T.,
16,
.F.,
.F.,
1
36.
1,
8,
9,
3,
4,
7,
7
37._职称代码___,___4______38.____4_____,__1____
39.SETRELATIONTO编号INTOB
40.____B.部门代码______,____ZJ/部门人数_
41.学号,INTOA,课程号INTOC42._1245
43.678944.____3______45.88146.__99100__
47.___3___48.3副教授
2.4.2习题
1.(D)2.(D)3.(D)4.(B)5.(A)6.(C)7.(D)8.(D)
9.(A)10.(A)11.(B)12.(A)13.(B)14.(A)15.(C)
16.(D)17.(A)18.(A)19.(B)20.(C)21.(B)22.(C)
23.(D)24.(C)25.(D)26.(D)27.(C)28.(D)29.(C)30.(A)
31.(D)32.(D)33.(B)34.(A)35.(B)36.(B)37.(C)
38.(B)39.(D)40.(A)41.(A)42.(D)43.(B)44.(B)45.(A)
46.(B)47.(B)48.(B)49.(B)
1.可以2.本地视图、远程视图3.不能4.本地视图
5.打开6.表,查询7.联接8.条件9.CREATEVIEW
10.INTOCURSOR11.SUM、AVG12.SELECT,FROM,WHERE
13.ON,SELECT,WHERE14.条件,顺序,分组信息
15.浏览窗口16.ALTERTABLE17.成绩=60OR成绩=100
18.WHERE工资>
100019.="
高等教育出版社"
OR_出版单位="
科学出版社"
______
20.AVG(单价),COUNT(*),GROUPBY
21.借阅证号,HAVING
三、操作题
1.
(1)SELECT货物,SUM(数量)FROM订购;
WHERE订购日期BETWEEN{^2005-08-01}AND{^2005-08-31};
GROUPBY货物
(2)SELECT客户ID,姓名,城市FROM客户;
WHERE客户IDIN(SELECT客户IDFROM订购;
WHERE订购日期BETWEEN{^2004-01-01}AND{^2004-12-31}
(3)SELECT货物ID,客户IDFROM订购DG;
WHERE数量=(SELECTMAX(数量)FROM订购;
WHERE货物ID=DG.货物ID)
(4)SELECT*FROM客户WHEREEXIST;
(SELECT*FROM订购WHERE订购.客户ID=客户.客户ID)
(5)ALTERTABLE货物ADD售出量N(3)
UPDATE货物SET售出量=(SELECTSUM(数量)FROM订购;
WHERE订购.货物ID=货物.货物ID)
2.
(1)SELECTP.PNAME,SP.QTYFROMS,P,SP;
WHEREP.PNO=SP.PNO.AND.S.SNO=SP.SNO.AND.S.SNAMELIKE′S%′
(2)SELECTS.SNAME,COUNT(SP.PNO)FROMS,SP;
WHERES.SNO=SP.SNOGROUPBYSNO
(3)SELECTCOUNT(S.SNO)FROMSWHERES.CITY=′北京′
(4)SELECTS.SNAMEFROMS,SP;
WHERES.SNO=SP.SNO.AND..NOT.EXISTS;
(SELECT*FROMSPWHEREPNO=′P2′.AND.S.SNO=SP.SNO)
(5)UPDATESPSETQTY=QTY*1.1;
WHEREPNOIN(SELECTPNOFROMP,SPWHERESP.PNO=P.PNO.AND.P.WEIGHT>
=17)
(6)DELETEFROMPWHEREPNO.NOT.IN(SELECTDISTINCEPNOFROMSP)
3.
(1)SELECTDISTINCTCITYFROMS
(2)SELECTPNO,PNAME,COLOR,WEIGHT,PRICEFROMP;
ORDERBYPNAME,PRICEDESC
(3)SELECTSNOFROMSPJWHEREJNO=′J1′
(4)SELECTSNOFROMSPJWHEREJNO=′J1′.AND.PNO=′P1′
(5)SELECTSNOFROMSPJWHEREJNO=′J1′.AND.PNOIN;
(SELECTPNOFROMPWHERECOLOR=′红′)
(6)SELECTJNOFROMSPJWHERENOTEXISTS;
(SELECT*FROMSWHERES.SNO=SPJ.SNO.AND.CITY=′天津′)
(7)UPDATEPSETCOLOR=′黑′WHERECOLOR=′灰′
(8)UPDATESPJSETSNO=′S2′;
WHERESNO=′S1′.AND.JNO=′J1′.AND.PNO=′P1′
(9)SELECTSNAMEFROMSWHERECITY=′北京′UNION;
SELECTJNAMEFROMJWHERECITY=′北京′
(10)DELETEFROMSPJWHEREPNOIN;
(SELECTPNOFROMPWHERECOLOR=′蓝′)
4.
(1)SELECTSNO,GFROMSCWHERECNO=′C1′ORDERBYGDESC
(2)SELECTSNO,SAFROMSWHERESAGEBETWEEN20AND22
(3)SELECT*FROMSWHERESDEP=′计算机系′ORSDEP=′数学系′
(4)SELECTSNO,CNOFROMSCWHEREGISNULL
(5)SELECTS.SNO,SNAME,SDEP,SA,GFROMS,SC;
WHERES.SNO=SC.SNO.AND.SC.CNO=′C1′.AND.(SC.G=′A′.OR.SC=′B′)
(6)SELECTFIRST.CNO,SECOND.PCNOFROMCFIRST,CSECOND;
WHEREFIRST.PCNO=SECOND.CNO
(7)SELECTSNAMEFROMSWHERE.NOT.EXISTS;
(SELECT*FROMSCWHERESNO=S.SNOANDCNO=′C3′)
(8)SELECT*FROMSWHERESDEP=′计算机系′UNION;
SELECT*FROMSWHERESAGE<
18
(9)SELECTCNO,COUNT(SNO)FROMSCGROUPBYCNO
(10)SELECTSNOFROMSCGROUPBYSNOHAVINGCOUNT(*)>
3
5.
(1)参考命令:
CREATE职工(职工号C(5)PRIMARYKEY,部门号C
(2),姓名C
(2)DEFAULT;
“男”,职称C(10),出生日期D,婚否L,工资N(8,2)CHECK工资>
=500AND工资<
=2000,ERROR;
“工资应在500-2000之间”DEFAULT1000)
(2)参考命令:
CREATETABLE部门(部门代号C
(2)PRIMARYKEY,部门名称C(10),负责人;
C(8))
(3)参考命令:
CREATETABLE工资(职工号C(5)PRIMARYKEY,基本工资N(8,2),津贴N(7,1),;
奖金N(3),会费N(5,2),公积金N(3))
(4)参考命令:
ALTERTABLE职工ADD年龄N(8,0)ALTER姓名C(6)DROP婚否
(5)参考命令:
ALTERTABLE职工ALTER职称SETDEFAULT“教授”
(6)参考命令:
法1:
INSERTINTO部门VALUE(“22”,”网络教研室”,”李新”)
法2:
DIMENSIONA(3)
A
(1)=“12”
A
(2)=“基础教研室”
A(3)=“王雨”
INSERTINTO部门PROMARRAYA
法3:
部门代码=“21”
部门名称=“软件教研室”
负责人=“李玛丽”
INSERTINTO部门PROMMEMVAR
(7)参考命令:
UPDATE职工SET年龄=YEAR(DATE())﹣YEAR(出生日期)
UPDATE工资SET会费=0
UPDATE工资SET会费=基本工资*0.005
ALTERTABLE职工DROP年龄
(8)参考命令:
DELETEFROM职工WHERE性别=“男”
(9)参考命令:
SELECT职称,YEAR(DATE())-YEAR(出生年月)AS年龄FROM职工
(10)参考命令:
SELECT*FROM部门
(11)参考命令:
SELECT*FROM部门WHERELEFT(部门代码,1)=“2”
(12)参考命令:
SELECT姓名,工资FROM职工WHEREYEAR(出生日期)<
=1970AND性别=“男”
SELECT姓名,工资FROM职工WHERE(出生日期)<
={^1970/12/31}AND性别=“男”
{^1971/01/01}AND性别;
=“男”
(13)参考命令:
SELECT姓名,出生日期FROM职工WHEREYEAR(出生日期)BETWEEN1960AND;
1970
(14)参考命令:
SELECOUNT(*)AS记录数,COUNT(DISTINCT部门号)AS部门数FROM职工
(15)参考命令:
S
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- VFP 程序设计 实践 教程 习题 部分 参考答案 重大 出版社
![提示](https://static.bdocx.com/images/bang_tan.gif)