Question: Create a trigger to update the TotalCount in AnimalNumbers when a row is deleted in Animal table. Instead of NEW.category it will be OLD.category. Also,

Create a trigger to update the TotalCount in AnimalNumbers when a row is deleted in
Animal table. Instead of NEW.category it will be OLD.category. Also, when it's an insert we use
After Insert, with a delete we will use After Delete
Now delete a bird record from the table by typing the following,
DELETE FROM Animal WHERE AnimalID=21;
** write the query to show the AnimalNumbers table where category equals cat or bird only.
Screenshot the command and the output.
**Type the command "show triggers" and screenshot the output through the first 6 columns,
Trigger, Event, Table, Statement, Timing, Created.
 Create a trigger to update the TotalCount in AnimalNumbers when a

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!