Hi
You must use from bellow Stored Procedure for do this:
Create Procedure YourStoredProcedureName
@ID Bigint
As
Begin Try
Update YourTableName
Set All parameters without ID must be set
Where ID = @ID
IF @@ROWCOUNT = 0
Begin
Insert YourTableName(All parameters without ID)
Values(All parameters without ID)
End
Select 0
Return
End Try
Begin Catch
Select Error_Number() * -1
Return
End Catch
I hope it is helpful for you.