Problem Description

In Orders(order_id) and Payments(payment_id, order_id), enforce that an order cannot be deleted if it has payments.

Input Format

SQL DDL

Output Format

DDL statement(s)

Sample Test Case

Input:
Orders, Payments
Output:
FK created

Constraints

Assume Orders exists

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next