Archive deleted rows using trigger

SQL Hard 0 views
Back to Questions

Problem Description

When a customer row is deleted, copy it into DeletedCustomers(customer_id, name, deleted_at) before deletion.

Input Format

SQL DDL

Output Format

Trigger created

Sample Test Case

Input:
Customers, DeletedCustomers
Output:
Trigger created

Constraints

DeletedCustomers table must exist

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev