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
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Renish Patel160 reputationPosted Jun 1, 2013, 4:48 AM EDT
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...
Renish Patel160 reputationPosted Jun 3, 2013, 3:38 AM EDT
Thanks
Renish