how to do all the arithmetic operations in a single stored .
how to do all the arithmetic operations in a single stored procedure.in sql server 2005
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Renish PatelPosted Jun 3, 2013, 7:38 AM
Thanks
Renish
Renish PatelPosted Jun 1, 2013, 8:48 AM
create procedure [dbo].[mathsoperation]
as
begin
DECLARE @a INT
SET @a=20;
DECLARE @b INT
SET @b=10;
SELECT
(@a+@b)AS Addition,
(@a-@b)AS Subtraction,
(@a*@b)AS Multiplication,
(@a/@b)AS Divison
end
It solves your problem..
If you getting your ans then please make this post as answered
Thanks
Happy Coding...