Saturday 7 September 2013

Add two no’s using stored procedure in SQl SERVER 2008.

In this article, I have explained how to add two no’s using stored procedure in Sql server 2008.

Create procedure sp_addNo(@no1 int,@no2 int)
AS

BEGIN

declare @total int

SELECT (@no1+@no2) as total;


End

For Executing stored procedure :-

 exec sp_addNo 5,5

This will the output : 
total
10

No comments:

Post a Comment

Note: only a member of this blog may post a comment.