0% found this document useful (0 votes)
6 views2 pages

Questions

The document contains a series of SQL statements for inserting, updating, and deleting records in an animals and vet visits database. It includes specific details such as enclosure numbers, family names, scientific names, and various actions to modify the data. Each SQL statement is followed by an indication of the number of records affected.

Uploaded by

Creecha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Questions

The document contains a series of SQL statements for inserting, updating, and deleting records in an animals and vet visits database. It includes specific details such as enclosure numbers, family names, scientific names, and various actions to modify the data. Each SQL statement is followed by an indication of the number of records affected.

Uploaded by

Creecha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#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)#

You might also like