In order to reuse or simplify part of code, it’s common to break down your stored procedure into multiple smaller stored procedures and call them as nested stored procedures. In most of the cases, your original stored procedure affects the content of the database. In order to make sure that the database is still consistent in case something unexpected occurs, the best solution is to use transactions and proper error handling.
...
read more