Question: Trigger Questions: Create a trigger to update your table on any insert into the Animal table. The following statements will be part of your trigger.

Trigger Questions:
Create a trigger to update your table on any insert into the Animal table. The following
statements will be part of your trigger.
UPDATE AnimalNumbers SET TotalCount =(select count(*) from Animal where
Category=NEW.Category) where Category=NEW.Category;
Now insert a cat into the Animal table by typing the following,
INSERT INTO Animal VALUES (100, 'DODO','Cat', 'Oriental Shorthair','2021-01-02','Male', NULL,
'Brown',150);
 Trigger Questions: Create a trigger to update your table on any

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!