TSQL: Use common table expression

With common table expressions you can save the results to a temporary result set and use this results set for other queries.

WITH temporaryNamedResultSet
  select UserName from aspnet_Users
select * from temporaryNamedResultSet

Leave a Reply

Your email address will not be published. Required fields are marked *