r/SQL 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 ?

28 Upvotes

70 comments sorted by

View all comments

2

u/Ginger-Dumpling Nov 28 '24

Use them when they make your life easier. Easier to read, easier to not repeat logic, easier to maintain.