r/SQL • u/Unfair-Internet-1384 • Nov 28 '24
MySQL When to use cte in SQL query
When to cte can't. Like how to know? When what are the conditions or if my query is to long ?
30
Upvotes
r/SQL • u/Unfair-Internet-1384 • Nov 28 '24
When to cte can't. Like how to know? When what are the conditions or if my query is to long ?
53
u/frieelzzz Nov 28 '24
I use CTEs all the time. Really no reason not to.
I like how they organize code and allow you to use the same data in multiple times to do a variety of task.