Procedure to place an order with items table variable

SQL Hard 2 views
Back to Questions

Problem Description

Create sp_place_order(p_customer_id, p_order_id) that inserts an order, then inserts all rows from TempOrderItems into OrderItems for that order in one go.

Input Format

SQL procedure

Output Format

Procedure created

Sample Test Case

Input:
TempOrderItems(product_id, qty, price), Orders, OrderItems
Output:
Procedure created

Constraints

Assume TempOrderItems already filled

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev