Problem Description

Create sp_discount_category(p_category, p_percent) that updates product prices and writes an audit row per product into PriceAudit(product_id, old_price, new_price, changed_at).

Input Format

SQL procedure

Output Format

Procedure created

Sample Test Case

Input:
Products, PriceAudit
Output:
Procedure created

Constraints

Use set-based insert-select

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next