欢迎来到天天文库
浏览记录
ID:12331551
大小:20.00 KB
页数:4页
时间:2018-07-16
《中国海洋大学vfp上机答案》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、第一题a=allt(thisform.text1.value)n=this.valuedocasecasen=1select*fromsbwhere商品名=athisform.refreshcasen=2updatesbset单价=出厂单价*1.1whereleft(商品号,2)="10"browsecasen=3copyto商品备份表.dbfcasen=4thisform.releaseendcasethisform.text1.setfocus关注第二题a=alltrim(thisform.text
2、1.value)b=left(a,2)i=2dowhilelen(b)3、学seleavg(计算机)from成绩intoarrayqthisform.text1.value=qthisform.refresh第四题上一条click事件代码skip-1ifbof()thisform.command1.enabled=.f.thisform.command2.enabled=.t.endifthisform.refresh下一条click事件代码skip+1ifeof()thisform.command2.enabled=.f.thisform.command1.enabled=4、.t.endifthisform.refresh第五题a=val(thisform.text1.value)b=val(thisform.text2.value)cx="select*fromstudentwhereval(学号)betweenaandbintocursorcx1"thisform.grid1.recordsource=cxthisform.refresh第六题n=this.valuedocasecasen=1creattableXLDA;(学号c(6),姓名c(10),成绩n(5,1)5、)insertintoXLDA;values("100101","德华",89)insertintoXLDA;values("100202","曼玉",90)insertintoXLDA;values("100103","学友",88)casen=2sele*fromXLDAorderby成绩desccasen=3seleleft(学号,4)as班级,sum(成绩)as班级总成绩fromXLDAgroupby班级casen=4sele*fromXLDAwher成绩between80and89intota6、blexsda1endcase第七题updatescoreset学分=iif(物理>=60,2,0)+iif(高数>=60,3,0)+iif(英语>=60,4,0)select*fromscoreorderby学分,学号descintotableXF第八题seleavg(成绩)fromCHENGJIgroupby学号intoarrayzthisform.refreshreplXUESHENG.平均分withzallthisform.refreshsele学号,姓名,平均分fromxueshenginto7、dbfpingjunorderby平均分,学号thisform.refresh第九题a=thisform.text1.valuethisform.grid1.recordsource="sele*fromcjwhere姓名=aintocursoraa"sele姓名,max(成绩)asb,min(成绩)asc,avg(成绩)asdfromcjgroupby姓名where姓名=aintocursoraaathisform.text2.value=bthisform.text3.value=cthisform8、.text4.value=d第十题n=thisform.optiongroup1.valuedocasecasen=1select姓名,专业名称fromstudent,classwherestudent.专业号=class.专业号casen=2select专业名称,count(*)as学生数fromstudent,classwherestudent.专业号=class.专业号groupby专业名称casen=3updatestudentse
3、学seleavg(计算机)from成绩intoarrayqthisform.text1.value=qthisform.refresh第四题上一条click事件代码skip-1ifbof()thisform.command1.enabled=.f.thisform.command2.enabled=.t.endifthisform.refresh下一条click事件代码skip+1ifeof()thisform.command2.enabled=.f.thisform.command1.enabled=
4、.t.endifthisform.refresh第五题a=val(thisform.text1.value)b=val(thisform.text2.value)cx="select*fromstudentwhereval(学号)betweenaandbintocursorcx1"thisform.grid1.recordsource=cxthisform.refresh第六题n=this.valuedocasecasen=1creattableXLDA;(学号c(6),姓名c(10),成绩n(5,1)
5、)insertintoXLDA;values("100101","德华",89)insertintoXLDA;values("100202","曼玉",90)insertintoXLDA;values("100103","学友",88)casen=2sele*fromXLDAorderby成绩desccasen=3seleleft(学号,4)as班级,sum(成绩)as班级总成绩fromXLDAgroupby班级casen=4sele*fromXLDAwher成绩between80and89intota
6、blexsda1endcase第七题updatescoreset学分=iif(物理>=60,2,0)+iif(高数>=60,3,0)+iif(英语>=60,4,0)select*fromscoreorderby学分,学号descintotableXF第八题seleavg(成绩)fromCHENGJIgroupby学号intoarrayzthisform.refreshreplXUESHENG.平均分withzallthisform.refreshsele学号,姓名,平均分fromxueshenginto
7、dbfpingjunorderby平均分,学号thisform.refresh第九题a=thisform.text1.valuethisform.grid1.recordsource="sele*fromcjwhere姓名=aintocursoraa"sele姓名,max(成绩)asb,min(成绩)asc,avg(成绩)asdfromcjgroupby姓名where姓名=aintocursoraaathisform.text2.value=bthisform.text3.value=cthisform
8、.text4.value=d第十题n=thisform.optiongroup1.valuedocasecasen=1select姓名,专业名称fromstudent,classwherestudent.专业号=class.专业号casen=2select专业名称,count(*)as学生数fromstudent,classwherestudent.专业号=class.专业号groupby专业名称casen=3updatestudentse
此文档下载收益归作者所有