SQL Savepoints and When to Use Them

Not many developers know about savepoints in relational databases. Even less of them know when to use them. It’s not their fault: I can’t remember seeing a good explanation of this feature. Let’s try to clarify this lesser-known functionality. In this article I’m using MariaDB syntax. But the concepts are very similar for other transactional databases. To know the exact syntax you should use on a…