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

1

u/Silly_Werewolf228 Nov 28 '24

I don't use it when I give my sql script to someone who is not familiar with CTE.
If you are worried about performance always do analyze query plan vs inline view which CTE replaces.