Current Headline

Listen to Your Daily Tune's

Saturday, October 02, 2010

Stored Procedure


--Stored Procedure

-- they are secured and pre-complied and are faster 

--Stored Procedure can be used for Insert,Delete and Update Statement's

-- we can use to name our stored procedure as usp_insert means user defined stored procedure or

--sp_insert  

CREATE PROC Sp_insertzpert (

-- defining parameter's

@id     INT,
@name1  VARCHAR(20),
@xdate  DATETIME,
@salary INT)
AS
  INSERT INTO xpertzoneblogspot  

    VALUES     (@id,
              @name1,
              @xdate,
             @salary)

  --Now Executing Stored Procedure

  EXEC Sp_insertzpert 6,'new value','2010-10-01',19000

  --Select the Database

  SELECT *  FROM   xpertzoneblogspot

 

No comments:

Post a Comment

Related Posts with Thumbnails

Xpert-Zone Blog Overview