Consider:
CREATE PROCEDURE LowerCityDiscounts @city VARCHAR(45), @decrease DECIMAL(10,2) AS
BEGIN
BEGIN TRANSACTION;
UPDATE Customers SET discnt = discnt
I ran across an issue (while migrating databases) that MSSQL will accept CALL
statement in a stored procedure - the SQL Management Studio complains but the query itself is executed successfully.
So a statement like this does execute:
create procedure spwho
as begin
call sp_who2
end
go
exec spwho
Unfortunately even though the procedure is created, it does not produce any results (but neither does it produce any errors or warnings).
So in cases like this the CALL
statement will not produce errors in MSSQL but anyway should never used since it does not work.