Wednesday, October 28, 2009

HOW TO CREATE SQL INPUT STORE PROCEDURE

dear friends if you don know how to create procedure then worry i will give you iddea how to create procedure ........so now learn how to create input store procedure ..
FIRST CRAETE TABLE

CREATE TABLE RAJ(R_ID INT,R_NAME VARCHAR(10));
INSERT INTO RAJ VALUES(1,'ANAND');
INSERT INTO RAJ VALUES(2,'VIKAS');
INSERT INTO RAJ VALUES(1,'VICKY');

/*NOW WE HAV TO CRAETE STORE PROCEDURE*/
CREATE PROC RAJU
(
@R_ID INT,
@R_NAME VARCHAR(10)
)
AS
BEGIN
INSERT INTO RAJ (@R_ID,@R_NAME);
END
EXEC RAJU 1,'ANAND';
NOW YOUR STORE PROCEDURE HAS BEEN CREATED.........

2 comments:

  1. hey its good way to decide the procedure i/p
    thanx

    ReplyDelete
  2. everything is looking cool.

    ReplyDelete