Updatable view idea
SQL
Medium
0 views
Problem Description
Create a view v_new_orders that selects Orders where status='NEW'. Show an update statement that updates through the view.
Input Format
SQL DDL + DML
Output Format
View + update
Constraints
Updatability depends on DB
Official Solution
CREATE VIEW v_new_orders AS SELECT order_id, customer_id, status FROM Orders WHERE status='NEW'; UPDATE v_new_orders SET status='PROCESSING' WHERE order_id=7001;
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!