免费游戏不用登录直接玩,苹果6s plus,不朽情缘滴血大奖视频,电子pga是什么意思

ACCP7.0優化myschool數據庫設計

時間:2020-11-15 19:32:30 ACCP培訓 我要投稿

ACCP7.0優化myschool數據庫設計

  ACCP課程體系通過結合先進的`多模式教學法,使學習者在掌握理論知識與工具的同時,具備良好的自我學習能力和個人素質,成為符合21世紀企業要求的IT人才。下面是關于ACCP7.0優化myschool數據庫設計,歡迎大家參考!

  上機1

  use MySchool

  go

  begin transaction

  declare @errornum int

  set @errornum=0

  insert into Result values('23219',1,90,'2013-09-12')

  set @errornum+=@@ERROR

  insert into Result values('23219',1,90,'2013-09-13')

  set @errornum+=@@ERROR

  insert into Result values('23219',1,90,'2014-09-12')

  set @errornum+=@@ERROR

  insert into Result values('23219',1,90,'2013-09-11')

  set @errornum+=@@ERROR

  insert into Result values('23219',1,90,'2003-09-12')

  set @errornum+=@@ERROR

  if @errornum<>0

  begin

  print '操作失敗,回滾事務'

  rollback transaction

  end

  else

  begin

  print '操作成功,保存事務'

  commit transaction

  end

  --上機2

  go

  begin transaction

  declare @errornum int

  set @errornum=0

  select * into historyresult from Result

  where StudentNo in(select StudentNo from Student

  where GradeId=(select GradeId from Grade where GradeName='Y2'))

  set @errornum+=@@ERROR

  delete from Result

  where StudentNo in(select StudentNo from Student

  where GradeId=(select GradeId from Grade where GradeName='Y2'))

  set @errornum+=@@ERROR

  select * into historystudent from Student

  where GradeId=(select GradeId from Grade where GradeName='Y2')

  set @errornum+=@@ERROR

  delete from Student

  where GradeId=(select GradeId from Grade where GradeName='Y2')

  set @errornum+=@@ERROR

  if @errornum<>0

  begin

  print '操作失敗,回滾事務'

  rollback transaction

  end

  else

  begin

  print '操作成功,保存事務'

  commit transaction

  end

  --上機3

  go

  CREATE VIEW vw_student_result_info

  AS

  SELECT 姓名=StudentName,學號=Student.StudentNo,

  聯系電話=Phone,學期=GradeName,成績=Total

  FROM Student

  LEFT OUTER JOIN (

  SELECT r.StudentNo,GradeName,SUM(StudentResult) Total

  FROM Result r

  INNER JOIN (

  SELECT StudentNo,SubjectId,MAX(ExamDate) ExamDate

  FROM Result

  GROUP BY StudentNo,Subjectid) tmp

  ON r.ExamDate=tmp.ExamDate

  AND r.Subjectid = tmp.Subjectid AND r.StudentNo = tmp.StudentNo

  INNER JOIN Subject sub ON sub.Subjectid = r.Subjectid

  INNER JOIN Grade g ON g.GradeId = sub.GradeId

  GROUP By r.StudentNo,GradeName ) TmpResult2

  ON Student.StudentNo = TmpResult2.StudentNo

  GROUP BY StudentName,Student.StudentNo,Phone,GradeName,Total

  GO

  SELECT * FROM vw_student_result_info

  --上機4

  go

  create nonclustered index index_result

  on result(studentresult)

  select studentname,Subjectname,ExamDate,StudentResult from Result

  with(index=index_result)

  inner join Student on Student.StudentNo=Result.StudentNo

  inner join Subject on Subject.SubjectId=Result.SubjectId

  where StudentResult between 80 and 90

【ACCP7.0優化myschool數據庫設計】相關文章:

1.OracleDBA數據庫性能進行優化

2.Linux數據庫的MySQL性能優化技巧

3.ACCP7.0課程設計理念簡介

4.Linux數據庫:關鍵的MySQL性能優化技巧

5.2016最數據庫設計技巧

6.access數據庫程序設計

7.數據庫程序設計介紹

8.大連ACCP7.0培訓機構

主站蜘蛛池模板: 漠河县| 南木林县| 大新县| 珲春市| 连城县| 桐城市| 宁安市| 大新县| 徐州市| 汉阴县| 泽普县| 彭泽县| 青铜峡市| 乐业县| 榆社县| 涪陵区| 房产| 佛山市| 阳春市| 丰台区| 芜湖县| 航空| 监利县| 娱乐| 九江县| 湘乡市| 宁远县| 牟定县| 北辰区| 宜昌市| 驻马店市| 松江区| 滨州市| 深州市| 洪洞县| 建阳市| 宜黄县| 金秀| 襄汾县| 丽江市| 丰都县|