Bird
0
0

You wrote this stored procedure:

medium📝 Debug Q14 of 15
SQL - Stored Procedures and Functions
You wrote this stored procedure:
CREATE PROCEDURE UpdateSalary()
BEGIN
  UPDATE Employees SET Salary = Salary + 1000
END;

When you try to run CALL UpdateSalary();, you get an error. What is the likely problem?
AProcedure name cannot have uppercase letters
BMissing semicolon after UPDATE statement
CCALL keyword is incorrect
DSalary column cannot be updated
Step-by-Step Solution
Solution:
  1. Step 1: Check procedure syntax

    Each statement inside BEGIN...END must end with a semicolon.
  2. Step 2: Identify missing semicolon

    The UPDATE statement lacks a semicolon at the end, causing syntax error.
  3. Final Answer:

    Missing semicolon after UPDATE statement -> Option B
  4. Quick Check:

    Semicolon missing = B [OK]
Quick Trick: End each SQL statement with semicolon inside procedures [OK]
Common Mistakes:
  • Thinking procedure names can't have uppercase letters
  • Believing CALL keyword is wrong
  • Assuming Salary column is read-only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes