DBI202_-_PE_-_SP_2024_-_Block_5_1908.webp
J

DBI202_-_PE_-_SP_2024_-_Block_5_1908.webp

  • Media owner Jogo99
  • Ngày thêm
Question 9:
Create a trigger named Tr_insert_enrollment for the insert statement on the 'enrollment'table so that when we call an insert statement to insert one or more enrollments into the 'enrollment' table, after inserting the corresponding rows into the 'enrollment' table, the system will automatically insert into the 'marks' table the rows with mark = NULL for all the assessments of the courses corresponding to the inserted enrollments.
8 of 8
Paper No: 6
For example, as the course with courseld = 11 has two assessments with Id=56 and Id=57,and the course with coursed = 1 has 8 assessments with Id from 11 to 18, when you execute the following statement for inserting two enrollments with the courseld = 11 and coursed = 1,the system will automatically insert into the 'marks' table 10 rows as in the following figure:
insert into enrollment (enrollmentid, studentld, courseld, semesterld)
values (600,9,11,4),
(601,10,1,5)
+ 100%
Zoom
Close
Chưa có bình luận nào.

Thông tin

Category
DBI202
Thêm bởi
Jogo99
Ngày thêm
Lượt xem
1,455
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
DBI202_-_PE_-_SP_2024_-_Block_5_1908.webp
File size
369 KB
Dimensions
2560px x 1314px

Share this media

Back
Bên trên Bottom