@ContactID int,
@Name varchar(50),
@Mobile varchar(50),
@Address varchar(250),
@Query int
)
AS
BEGIN
IF(@Query = 1)
BEGIN
Insert into Contact
(
Name ,
Mobile ,
Address
)
values
(
@Name ,
@Mobile ,
@Address
)
IF(@@ROWCOUNT > 0)
Begin
Select 'Insert'
End
End
IF(@Query = 2)
Begin
Update Contact
set
Name =@Name ,
Mobile =@Mobile ,
Address = @Address
where ContactID =@ContactID
Select 'Update'
End
IF(@Query = 3)
Begin
Delete from Contact where ContactID =@ContactID
Select 'Deleted'
End
IF(@Query = 4)
Begin
Select * from Contact
End
End
IF(@Query = 5)
Begin
Select * from Contact where ContactID =@ContactID
End
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers