About Me

My photo
MCTS FOR SQL SERVER 2008 DOT NET PROGRAMMING WEB DESIGNING

Sunday, 2 October 2011

how to create a procedure?

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

No comments:

Post a Comment