Current Headline

Listen to Your Daily Tune's

Saturday, October 02, 2010

Stored Procedure-Delete

--Delete Procedure

--as delete from table will be from a unique key and in our table it is primary key

CREATE PROC Sp_deletexpert (@id INT)

AS

  DELETE FROM xpertzoneblogspot WHERE  id = @id
 

  --executing delete procedure
 EXEC Sp_deletexpert 6

  --selecting database again
  SELECT *  FROM   xpertzoneblogspot 




No comments:

Post a Comment

Related Posts with Thumbnails

Xpert-Zone Blog Overview