There is some new feature of SQL, I think that it was intruduced in 2005 that I never used. I can’t remember what it was called, but I recall reading about it. It was an acronym similar to CT_ or something….
It was used to avoid reproducing the same code within a single SQL, for readability and (I assume) for performance reasons–because the common code would only be evaluated once.
What was it called? I am having a bit of trouble trying to find it and thought someone could easily tell me.
You’re talking about a Common Table Expression or CTE. It’s especially useful for recursive queries.