DBI202_-_FA_2024_-_PE_-_s_-_8_2894.webp
Hương Giang1

DBI202_-_FA_2024_-_PE_-_s_-_8_2894.webp

For example, if we execute the following statements to insert two doctors (one with
DepartmentID=NULL and the other with DepartmentID=5) and then select these two doctors,we can see that the DepartmentID of the doctor with DepartmentID=null is set to the id of the department named 'Cardiology' as shown in the following figure:
insert into Doctors (DoctorID, FirstName, LastName, PhoneNumber, Email, DepartmentID)values (70,'Van Chien', 'Nguyen', '0928367812', '[email protected]', null),(71,'Thi Binh', 'Nguyen', '0989278127', '[email protected]',5)
select * from Doctors where DoctorID in (70,71)
DoctorID
70
71
FirstName
LastName
Phone Number Email
1
2
DepartmentID
0928367812 [email protected] 1
Van Chien Nguyen Thi Binh
Nguyen
0989278127
[email protected] 5
Question 10:
Zoom
Picture 9.1
+ 100%
Close

Thông tin

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

Image metadata

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

Share this media

Back
Bên trên Bottom