r/SQLServer • u/Tectec8 • Jul 03 '26
Discussion sub queries
I'm studying SQL and am currently on the lesson about subqueries, but I just can't seem to wrap my head around it.
I'm struggling to get the different types of subqueries—and when to use each one—to stick in my mind.
Does anyone have any study materials on this? Maybe a YouTube video tutorial?
THANKS!
5
Upvotes
View all comments
Show parent comment
3
u/jshine13371 6 Jul 03 '26
A generalized statement which is inclusive of other things (not just CTEs) isn't the same as what you said "'CTE perform worse than subselect'". That's a more specific and drastic statement.
Regardless, as my edit points out, there are use cases where that's technically true.