SQL - Stored Procedures and Functions
Given this procedure:
What happens when you run
CREATE PROCEDURE updateStock(productId INT, qty INT) AS $$ BEGIN UPDATE products SET stock = stock + qty WHERE id = productId; END; $$ LANGUAGE plpgsql;
What happens when you run
CALL updateStock(5, 10);?