SQL - Stored Procedures and Functions
You wrote this procedure to update a user's email:
When you try to call it with
CREATE PROCEDURE updateEmail(userId INT, newEmail VARCHAR(100)) BEGIN UPDATE users SET email = newEmail WHERE id = userId; END;
When you try to call it with
SELECT updateEmail(1, 'test@example.com');, you get an error. What is the problem?