Data-driven applications need to generate SQL from time to time. Usually, we leverage things like stored procedures or ORM tools
to keep our code sane, but from time to time, we might hard code our SQL statements. You sacrifice some flexibility for some transparency into what your code actually does to the database.
[expand full text]