As I have presented my Common Table Expressions presentation many times, and as part of writing the Common Table Expressions Book I have created some sample database scripts to use. Once you load up the script into SSMS and refresh the databases tree item, you will see a new database called cte_demo that includes 2 tables. dbo.Departments The first table is called …

Sample Database for Common Table Expressions Read more »