输入banner图图片脚本导航/分类

sqlserver自定义函数

 

 

ALTER function [dbo].[getStaLike](@sex NVARCHAR,@active NVARCHAR,@age decimal,@HEIGHT decimal,@WEIGHT decimal)
returns NVARCHAR(64)
as
begin
return(
select top 1 s.id from standard s where sex=@sex and active= @active order by abs(AGE-@age), abs(HEIGHT-@HEIGHT), abs(WEIGHT-@WEIGHT)
)
end

sqlserver自定义函数

标签:pos   arc   自定义函数   get   alike   nvarchar   varchar   begin   定义函数