资源描述:
《数据库存储过程实验报告》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、为了适应公司新战略的发展,保障停车场安保新项目的正常、顺利开展,特制定安保从业人员的业务技能及个人素质的培训计划数据库存储过程实验报告 xx大学计算机与信息技术学院 实 验 报告 实验12 一、导入数据 二、编写存储过程: createproccluster_kmeans as setnocounton declare@pointX1numeric(10,6) declare@pointY1numeric(10,6) declare@pointX2numeric(10,6) declar
2、e@pointY2numeric(10,6) selecttop1@pointX1=X,@pointY1=Y fromdataset selecttop1@pointX2=X,@pointY2=Y fromdatasetwhereX@pointX1orY@pointY1 declare@t1table( pointXnumeric(10,6),目的-通过该培训员工可对保安行业有初步了解,并感受到安保行业的发展的巨大潜力,可提升其的专业水平,并确保其在这个行业的安全感。为了适应公司新战略的发展,保障停车场
3、安保新项目的正常、顺利开展,特制定安保从业人员的业务技能及个人素质的培训计划 pointYnumeric(10,6) ) declare@t2table( pointXnumeric(10,6), pointYnumeric(10,6) ) insert@t1 select* fromdataset wherepower(@pointX1-X,2)+power(@pointY1-Y,2)=power(@pointX2-X,2)+power(@pointY2-Y,) select@pointX1
4、=avg(pointX),@pointY1=avg(pointY)from@t1 select@pointX2=avg(pointX),@pointY2=avg(pointY)from@t2 whileexists( select1 from@t1目的-通过该培训员工可对保安行业有初步了解,并感受到安保行业的发展的巨大潜力,可提升其的专业水平,并确保其在这个行业的安全感。为了适应公司新战略的发展,保障停车场安保新项目的正常、顺利开展,特制定安保从业人员的业务技能及个人素质的培训计划 wherepower(
5、@pointX1-pointX,2)+power(@pointY1-pointY,2)>power(@pointX2-pointX,2)+power(@pointY2-pointY,2)) orexists( select1 from@t2 where power(@pointX1-pointX,2)+power(@pointY1-pointY,2)=power(@pointX2-X,2)+power(@pointY2-Y,) select@pointX1=avg(pointX),@pointY1=av
6、g(pointY)from@t1 select@pointX2=avg(pointX),@pointY2=avg(pointY)from@t2 end --输出结果 select@pointX1asX1,@pointY1asY1 select*from@t1 select@pointX2asX2,@pointY2asY2 select*from@t2 go目的-通过该培训员工可对保安行业有初步了解,并感受到安保行业的发展的巨大潜力,可提升其的专业水平,并确保其在这个行业的安全感。为了适应公司新战略的
7、发展,保障停车场安保新项目的正常、顺利开展,特制定安保从业人员的业务技能及个人素质的培训计划 --调用 execcluster_kmeans 输出结果: 第一组第二组 存储过程、触发器和用户自定义函数实验兰州大学数据库实验报告实验内容一 练习教材中存储过程、触发器和用户自定义函数的例子。教材中的BookSales数据库,在群共享中,文件名为。 实验内容二 针对附件1中的教学活动数据库,完成下面的实验内容。 1、存储过程 创建一个存储过程,该存储过程统计“高等数学”的成绩分布情况,即按照各分数段统
8、计人数。 CREATEProcMATH_NUM@MATHCHAR(20)='高等数学' AS SELECT@MATHascanme,count(casewhenscore>=90then1end)as[90以上],count(casewhenscore>=80andscore=70andscore数据库存储过程实验报告)asewhenscore>=60