case in sql server 2008 r2

Create Function in SQL Server

--================================
--CREATE FUNCTION WITH PARAMETERS.
--================================
CREATE FUNCTION AddFun1(@NumIst INT,@NumpIInd INT)
RETURNS INT
AS BEGIN
DECLARE @Result AS INT
    SET @Result=@NumIst+@NumpIInd
RETURN @Result
END

----RESULT LOOKS LIKE,
Print test.dbo.AddFun1(10,20) --IS 30

ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Buy Books Online at Best Prices

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.