Problem Description

If an order exists update its status, otherwise insert it. Write an upsert pattern.

Input Format

SQL DML

Output Format

DML statement(s)

Sample Test Case

Input:
Orders(order_id, status)
Output:
Row inserted/updated

Constraints

DB-specific; show MERGE style

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next