Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DO NOT USE AI OR GPT SOLVE IT PROPERLY READ THE QUESTION SOLVE Q 1 AND Q 2 YOU HAVE TO FILL IN THE BLANK
DO NOT USE AI OR GPT SOLVE IT PROPERLY
READ THE QUESTION
SOLVE Q AND Q
YOU HAVE TO FILL IN THE BLANK "WRITE DOWN WHAT'S HIDDEN HERE"
Miniassignment see
MovieExecname address, cert# netWorth
We want to keep the average networth above
This trigger is for updates.
Write a similar trigger for insertions.
CREATE TRIGGER AvgNetWorthTrigger
AFTER UPDATE OF netWorth ON MovieExec
REFERENCING
OLD TABLE AS OldStuff,
NEW TABLE AS NewStuff
FOR EACH STATEMENT
CREATE TRIGGER AvgNetWorthTrigger
AFTER INSERT ON MovieExec
Q: WRITE DOWN WHAT'S HIDDEN HERE
FOR EACH STATEMENT
WHEN SELECT AVGnetWorth FROM MovieExec
Q: WRITE DOWN WHAT'S HIDDEN HERE
WHEN SELECT AVGnetWorth FROM MovieExec
BEGIN
DELETE FROM MovieExec
WHERE name address, cert# netWorth IN NewStuff;
INSERT INTO MovieExec SELECT FROM OldStuff;
END;
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