DBI202_-_FA_2024_-_PE_-_s_-_3_2890.webp
I

DBI202_-_FA_2024_-_PE_-_s_-_3_2890.webp

Picture 7.1
Question 8:
Create a function named F2 which calculates and returns an integer number which is the number of distinct patients who were required to do a given test during their appointments,where testID int is the input parameter of the function.
For example, when we call the F2 function in the following query for calculating the number of distinct patients who were required to do each of the four tests with testID respectively 9,10, 11 and 12, the results must be shown as in the following figure:
select TestID, Name, dbo.F2(TestID) as NumberOfPatients
from Tests
where TestID in (9,10,11,12)
TestID
Name
NumberOfPatients
5
2
5
1
9 Thyroid Test
2 10 Liver Function Test
3
4
11
12
Kidney Function Test
Complete Blood Count 8
Question 9:
Picture 8.1
Create a trigger named insertDoctor for the INSERT statement on the "Doctors" table so that
Close
+ 94%
Zoom
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
DBI202_-_FA_2024_-_PE_-_s_-_3_2890.webp
File size
196.6 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom