Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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;
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 columns,
Trigger, Event, Table, Statement, Timing, Created.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started