Question: SQL : I have created 3 tables ( table 1 , table 2 and view 3 ) in a database. I would like to
SQL : I have created tables table table and view in a database. I would like to create a trigger that shows the message none available"" and prevents insertion on on table when view is empty.
I have tried this:
create trigger noneavailable before insert on table for each row if not exis UJ ts select from available begin print none available"" end;
but I get a syntax error at if
I would like to know how to create this trigger or something similar that would not allow insertion on table when view is empty."
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
