#1.
1
Write an SQL statement inserts the following details into the animals table:
Enclosure number: ZX1
Family name: Rhinocerotidae
Scientific name: Ceratotherium simum
General name: White rhino
Number of adults: 1
Number of young: 1
Enclosure size: 1000
Endangered status: Vulnerable.
(1 record affected)#
#1.2
Write an SQL statement inserts the following details into the vet visits table:
Visit ID: 50
Visit Date: 2019/10/15
Enclosure number: ZH3
Reason for visit: Arm injury
Follow up: False
Animal ID: ZH3_2
(1 record affected)#
#1.3
Write an SQL statement inserts the following details into the animals table:
Enclosure number: ZX2
Family name: Hippopotamidae
Scientific name: Hippopotamus amphibius
General name: Hippopotamus
(1 record affected)#
#2.1
Write an SQL statement that changes the meerkats (general name) enclosure size to
50.
(1 record affected)#
#2.2
Write an SQL statement that changes the tigers (general name) general name to
Siberian tiger.
(1 record affected)#
#2.3
Write an SQL statement that increases the number of adults by 4 for all the
Mustelidae family.
(5 records affected)#
#2.4
Write an SQL statement that changes all the animals with no enclosure size to 100.
(2 records affected)#
#2.5
Write an SQL statement that changes all the follow up values to true for all the
routine check-up vet visits in September that needed a follow up (are false).
(19 records affected)#
#3.1
Write an SQL statement that deletes visit ID 30 in the vet visits table.
(1 record affected)#
#3.2
Write an SQL statement that deletes all the vet visits that involved ear infections
for the reason for the visit.
(5 records affected)#
#3.3
Write an SQL statement that deletes all the vet visits that took place on the 5th
day of any month.
(4 records affected)#
#3.4
Write an SQL statement that deletes all the skin problems and ear infections that
had a follow up (true) from the vet visits table.
(6 records affected)#