RSSAmplifier

boringSQL | Supercharge your SQL & PostgreSQL powers · Mar 29, 2026

Good CTE, bad CTE

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

The Common Table Expression , or CTE, is often the first feature developers reach for beyond basic SQL, and often the only one. You write a subquery after WITH , give it a name, and use it in the rest of your query. It only exists for the duration of that query. But the popularity of CTEs usually has less to do with modernizing code and more to do with the promise of imperative logic. For many,…

Read on boringsql.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.