Current Headline

Listen to Your Daily Tune's

Saturday, October 02, 2010

Stored Procedure-Update

--update stored procedure

CREATE PROC Sp_updatexpertzone (@id     INT,

                                @name1  VARCHAR(20),

                                @xdate  DATETIME,

                                @salary INT)


  UPDATE xpertzoneblogspot

  SET    name1 = @name1,
         xdate = @xdate,
         salary = @salary
  WHERE  id = @id
  --executing stored Procedure

EXEC Sp_updatexpertzone    2, 'update value', '2010-10-01',9000  --select tables again

  SELECT *  FROM   xpertzoneblogspot

The Guru's Guide to SQL Server Stored Procedures, XML, and HTML

Microsoft SQL Server 2005 Stored Procedure Programming in T-SQL & .NET

No comments:

Post a Comment

Related Posts with Thumbnails

Xpert-Zone Blog Overview