its very simple.......................
syntax:-
create proc test_proc
@customer_id int,
@name varchar(50),
@address varchar(50)
as
------------inserting values into test table-------------
begin
insert into test values (@customer_id, @name, @address)
end
--------executing the procedure-------
exec test_proc 1, 'shiva', 'visakhapatnam'
-------testing the result--------
select * from test
syntax:-
create proc test_proc
@customer_id int,
@name varchar(50),
@address varchar(50)
as
------------inserting values into test table-------------
begin
insert into test values (@customer_id, @name, @address)
end
--------executing the procedure-------
exec test_proc 1, 'shiva', 'visakhapatnam'
-------testing the result--------
select * from test
No comments:
Post a Comment