日期:2014-05-18  浏览次数:20482 次

怎么调用函数
create function se()
returns int
begin 
declare @wb int
select @wb=(select AVG(cc) FROM dbo.aa WHERE bb='a' GROUP BY bb)
return @wb
end

declare @aa int
select @aa=se()

调用时出现'se' 不是可以识别的 内置函数名称。

------解决方案--------------------
SQL code

select @aa=dbo.se()

------解决方案--------------------
SELECT @AA=DBO.SE();