Question: For the following constraints, write the IF statement using SQL for the trigger enforcing the constraint and identify on what SQL statement the trigger is
For the following constraints, write the IF statement using SQL for the trigger enforcing the constraint and identify on what SQL statement the trigger is executed. Refer to the given database.
EXAMPLE: Parts cant weigh more than 100.0.
Table P, BEFORE INSERT and BEFORE UPDATE:
IF NEW.WEIGHT > 100 THEN SIGNAL SQLSTATE 45000 SET MESSAGE_TEXT = Part weight cannot exceed 100; END IF;
a. Shippers shipping quantities greater than 1,000 pieces in a single shipment must have a status of at least 30.
b. The maximum shipment weight is 10,000.
Database with example values:

0 Q-32 4211342 234 5 T -000000 di id e nrrnh G -277429 21323 L -deudud 0-er-ele C -RGBRBR hseks t1rr N 1234S N 1234S6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
