KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Consider: CREATE PROCEDURE LowerCityDiscounts @city VARCHAR(45), @decrease DECIMAL(10,2) AS BEGIN BEGIN TRANSACTION; UPDATE Customers SET discnt = discnt - @decrease WHERE Customers.city = @city; UPDATE Customers SET discnt = 0 WHERE Customers.city = @city AND discnt < 0 COMMIT; END; I tried to call this procedure with: CALL LowerCityDiscounts 'Cleveland', 5; but this only produces Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'Cleveland'. Yet, if I change things to EXEC LowerCityDiscounts 'Cleveland', 5; everything works fine. This despite that the documentation stating that call is the right syntax. Why does EXEC work when CALL does not?
Tags (comma-separated)
Save Edits
Cancel