Problem Description

Create sp_add_coupon(code, discount) that validates discount first. If discount is not in 1..80, raise an error; otherwise insert the coupon.

Input Format

SQL procedure

Output Format

Procedure created

Sample Test Case

Input:
Coupons(code, discount_percent)
Output:
Procedure created

Constraints

MySQL-style SIGNAL for error

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next