Problem Description

Coupons(code, is_active). Before INSERT, if the same code already exists with is_active=1, then block the insert.

Input Format

SQL DDL

Output Format

Trigger created

Sample Test Case

Input:
Coupons
Output:
Trigger created

Constraints

MySQL-style SIGNAL + EXISTS

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next