create procedure mathopera
(
@c int,
@e int,
@g int,
@i int
)
as
begin
set nocount on
select
(a+b) as c,
(@c-d) as e,
(@e*f) as g,
(@g/h) as i
from maths
end
if i entered the values all the operations have to be not performed .any mistake means correct it
Loading

Renish PatelPosted Jun 3, 2013, 7:37 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...
selvi subramanianPosted Jun 1, 2013, 5:32 AM
Renish PatelPosted May 31, 2013, 6:14 AM
Can you please explain Maths table with field?
and for which purpose you have to used this store procedure?
Thanks