Question: Triggers: First complete the following three steps prior to completing Questions 4 and 5 . Step 1 : Create this table: CREATE TABLE AnimalNumbers (

Triggers:
First complete the following three steps prior to completing Questions 4 and 5.
Step 1: Create this table:
CREATE TABLE AnimalNumbers (
C_ID char(2) not null primary key,
Category VARCHAR(100),
TotalCount INTEGER) engine = InnoDB;
Step 2: Add 6 rows of data:
Insert into AnimalNumbers values
('A1', 'Dog',0),
('B1','Cat',0),
('C1','Bird',0),
('D1','Fish',0),
('E1','Reptile',0),
('F1','Spider',0);
Step 3: Update the data to reflect how many animals in each category are currently in the
Animal table.
UPDATE AnimalNumbers set TotalCount select count (**) from Animal where category =
AnimalNumbers.Category);
give the detail step of how to do this, and show the sql query.
 Triggers: First complete the following three steps prior to completing Questions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!