insert - SQL - Guaranteed execution of all statements -
I want to run a series of SQL INSERT statements. The problem is that I want an all-or-something approach, or if they execute all of them or one of them is not executed, then there is no change in the database. I can imagine that the only solution is using conditional loop, but does it mean unnecessary code (determining changes, leaving tables etc.) is there a simple solution? I have searched extensively for a solution, but have not received any similar questions, so if asked before, apologize < Div class = "post-text" itemprop = "text"> You need to use a transaction , you can find an MSDN example.
Comments
Post a Comment