DBI202_-_PE_-_SP_2025_-_s_4_3476.webp
hoangha297

DBI202_-_PE_-_SP_2025_-_s_4_3476.webp

Kizspy.me The DoctorID of the inserted medical record is equal to the DoctorID of the appointment
corresponding to the inserted medical record.
For example, if we execute the following statements to insert 4 medical records and then
select these medical records from "Medical Records" table, we can see that only the first row
is inserted as shown in the following figure. The second row is not inserted because the
RecordDate is not valid, the third row is not inserted because the DoctorID is not valid and
the 4th row is not inserted because the PatientID is not valid.
insert into Medical Records (RecordID, PatientID, DoctorID, AppointmentID, Diagnosis,
Treatment, Notes, RecordDate)
values(200,16,9,28,'Migraine', 'Dietary changes','Diagnosed with Migraine', '2021-08-14
10:30:00.000'),
(201,7,19,45,'Arthritis', 'Regular monitoring', 'Monitoring', '2019-03-07 00:00:00.000'),
(202,40,21,60,'Flu', 'Medication', 'Medication', '2022-01-20 10:00:00.000'),
(203,58,1,70,'Flu', 'Medication', 'Medication', '2021-01-12 10:00:00.000')
select from Medical Records
where RecordID>= 200
1
RecordID PatientID DoctorID AppointmentID Diagnosis Treatment
200
16
9
28
Notes
RecordDate
Migraine Dietary changes Diagnosed with Migraine 2021-08-14 10:30:00.000
Picture 9.1
Question 10:
Write statements to delete from the Appointments table two appointments with
AppointmentID=139 and AppointmentID=140. You must delete also the rows from the
Prescriptions, Billing and Medical Records tables corresponding to the deleted appointments.
Zoom
- FUO
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom