Yup, I'm on team CTE as I dislike too many subqueries, they hurt my brain. One question I 've gotten alot during interviews over the years is WHAT'S THE DIFFERENCE BETWEEN SUBQUERY AND CTE? and also WHAT'S THE DIFFERENCE BETWEEN CTE and TEMPORARY TABLE?
@learningwithjelly6 ай бұрын
CTEs last for the one use so it only applies to the query that is right after the CTE. A temporary table can be created and called on for many times after you created and is stored in your local memory for a given amount of time (at least for the entire SQL session)
@developbit6 ай бұрын
is it possible to provide some more practice for this video? I am still not clear on the CTE in SQL?