All Type Coding

Search Here

Biggest number out of three number in sql server.




















declare @a int=8, @b int=6, @c int=9
if(@a>@b and @a>@c)
begin
print @a
end
else if(@b>@c and @b>@a)
begin
print @b
end
else if(@c>@a and @c>@b)
print @c


Out put will be : 9
we can make a function of above given  code but we 'll discuss later to function 



No comments :

Post a Comment