0
create function fn_with_parameter
(
@id int=null
)
returns int
with returns null on null input
as
begin
declare @total int
select @total=sum(marks) from test3
where [email protected]
return @total
end
选择:
select dbo.fn_with_parameter(default);
可能你详细说明你的问题?只是复制/粘贴代码不能够让SO社区帮助你。 –
'空输入返回null','@id int = null','dbo.fn_with_parameter(默认)' - ??? –
@PareshJ代码正常..但输出为空 –