Fight With Me!!!

导航

关于自定义函数的创建和调用

Create function AvgResult(@scode varchar(10))

Returns real

As

Begin

   Declare @avg real

  set @avg='1.2';

    Return @avg

End

调用方法:

select dbo.AvgResult('s0002') as result

posted on 2014-12-28 13:20  nickTimer  阅读(262)  评论(0编辑  收藏  举报