tsql how use cte code example Example: tsql cte in a transaction BEGIN TRANSACTION ;WITH CTE ..... SELECT.....etc. COMMIT TRANSACTION