Question: 5. Write a script that creates and calls a stored procedure named update_product_discount that updates the discount_percent column in the Products table. This procedure




5. Write a script that creates and calls a stored procedure named

5. Write a script that creates and calls a stored procedure named update_product_discount that updates the discount_percent column in the Products table. This procedure should have one parameter for the product ID and another for the discount percent. If the value for the discount_percent column is a negative number, the stored procedure should raise an error that the value for this column must be a positive number. Code at least two CALL statements that test this procedure.

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!