SQL - Table Constraints
Consider these tables:
What will happen if you try to update
CREATE TABLE orders (order_id INT PRIMARY KEY);
CREATE TABLE order_items (
item_id INT PRIMARY KEY,
order_id INT,
FOREIGN KEY (order_id) REFERENCES orders(order_id) ON UPDATE RESTRICT
);
What will happen if you try to update
orders.order_id that is referenced by order_items.order_id?