My application allows the user to add or delete records at will . To delete records the user needs to only empty the field . Because of this constraint I have to delete all the records for the user in the particular tables and then insert (even if the records have not changed/only additions were made) .
I want to change this arrangement and set up a stored procedure which compares the data from the user with the one present in db and then perform insert/delete or update .
Can this be done ? I am not too well versed with Stored procedures.
Simply put…yes.
Stored Procedures allow you to perform multiple statements, which can simply resolve any of the problems you might need resolved.
You can check out a tutorial here.
Hope this helps.