2 ms·
Find me CTEs in mysql or sqlite. I dare you. And of course you can do it all inline. For transactional uses, that is probably best anyway. But there are clear
by saosebastiao 13y ago
Find me CTEs in mysql or sqlite. I dare you.
And of course you can do it all inline. For transactional uses, that is probably best anyway. But there are clear use cases where inline queries are significantly less readable. Imagine subqueries nested 6 levels deep...CTEs allow you to flatten it such that you can linearly read the buildup of the query from top to bottom. It also allows the optimizer additional room for optimization, as it allows the optimizer to decide based on its analyze data whether the query is best run inline or by creating temp tables.
- socialist_coder 13y agoOk, another reason to never use mysql.