create function MaxValue (@int1 int, @int2 int)
returns int
as
begin
declare @maxValue int
if (@int1 > @int2)
select @maxValue = @int1
else
select @maxValue = @int2
return @maxValue
end
select dbo.MaxValue(300,200)
create function MaxValue (@int1 int, @int2 int)
returns int
as
begin
declare @maxValue int
if (@int1 > @int2)
select @maxValue = @int1
else
select @maxValue = @int2
return @maxValue
end
select dbo.MaxValue(300,200)