- SQL code
create function hello2(@ix int,@iy int)return int isdeclare @temp int;if (@ix > @iy)begin @temp = @ixendelsebegin@temp = @iyendreturn @temp
------解决方案--------------------
------解决方案--------------------
create function hello2(@ix int,@iy int)
returns int
as
begindeclare @temp int;
if (@ix > @iy)
begin
set @temp = @ix
end
else
begin
set @temp = @iy
end
return @temp
end