A_Philosopher
I am a content writter !
//---------Create a procedure for Add new record--------//
CREATE Proc ContactCreateOrUpdate @ContactID int, @Name varchar(50), @Mobile varchar(50), @Address varchar(50) AS BEGIN IF(@ContactID=0) Begin insert into Contact(Name,Mobile,Address) values(@Name, @Mobile, @Address) END Else Begin update Contact Set Name=@Name, Mobile=@Mobile, Address=@Address where ContactID=@ContactID END END
You need to log in or register to vote on answers or questions.
//---------Create a procedure for Add new record--------//