1
我正在學習存儲過程,這裏是我寫的代碼。但它給錯誤。SQL Server存儲過程中的錯誤
Error: Incorrect syntax near '@return'.
我的代碼:
create procedure test (@status varchar(50), @return varchar(50) output)
as
begin
if @status = 'running'
begin
@return = '1'
end
else
begin
@return = '2'
end
end