anjali khan

anjali khan

  • NA
  • 293
  • 66k

how to handle the error handling in stored procedure in sql?

Mar 11 2016 2:25 AM
hi Frnds
 
i m giving the ex..suggest me how to do error handling in this example
 
 Create Procedure Record
(
   @id  int,
    @name         Varchar(15),
    @ Salary       Decimal(10,2),
    @StmtType   Nvarchar(30)=""
)
 
  As
   Begin
          if@stmttype='Insert'
            Insert into employee(id,name,salary)values(@id,@name,@salary)
  End
   Begin
         if@stmttype='Update'
          update set  employee name=@name,salary=@salary where id=@id
 
  End....
 
 
 
 
 
 
 

Answers (5)