我正在从一本书学习SQL,并尝试编写存储过程,但我不相信我正在正确地操作。以下方式在Microsoft SQL中无效吗?如果无效,那么什么情况下有效,如果有的话?
create procedure dept_count(in dept_name varchar(20), out d_count integer)
begin
select count(*) into d_count
from instructor
where instructor.dept_name=dept_count.dept_name
end
我遇到了以下错误
Msg 156, Level 15, State 1, Procedure wine_change, Line 1 Incorrect syntax near the keyword 'in'.
in
关键字 - LuigiEdlCarno