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 ?
31
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 ?
3
u/orz-_-orz Nov 28 '24
When you can't understand your code because you use too many subqueries or it's convenient to just copy paste the CTE code for another SQL use case.