- Course
SQL Server: Transact-SQL Common Table Expressions
Learn how to create and use common table expressions (CTEs) correctly, for developers and DBAs from SQL Server 2005 onward
- Course
SQL Server: Transact-SQL Common Table Expressions
Learn how to create and use common table expressions (CTEs) correctly, for developers and DBAs from SQL Server 2005 onward
Get started today
Access this course and other top-rated tech content with one of our business plans.
Try this course for free
Access this course and other top-rated tech content with one of our individual plans.
This course is included in the libraries shown below:
- Data
What you'll learn
Common table expressions are a useful and versatile T-SQL query construct and this demo-centric course shows how to correctly define and use CTEs, what restrictions there are for using them, and some common usage scenarios. This course is perfect for developers, DBAs, and anyone responsible for writing Transact-SQL code, from complete beginners through to those with more experience. The information in the course applies to all versions from SQL Server 2005 onward.
SQL Server: Transact-SQL Common Table Expressions
-
Module Introduction | 43s
-
What are CTEs and Why Use Them? | 1m
-
CTE Syntax | 1m 10s
-
Demo: Non-Recursive CTE Example | 3m 4s
-
Demo: Semicolon Requirements | 1m 7s
-
Demo: When Column Names Must Be Specified | 1m 50s
-
Demo: Execution Scope | 2m 30s
-
Demo: Multiple CTE Query Definitions | 1m 22s
-
Demo: Defining and Referencing Multiple CTEs | 1m 24s
-
Demo: Multiple References To the Same CTE | 3m 2s
-
Demo: CTEs with Data Modification Statements | 2m 25s
-
Demo: CTEs and Views | 1m 10s
-
Demo: CTEs and Stored Procedures | 55s
-
Demo: CTEs and Triggers | 1m 37s
-
Demo: CTEs and User-Defined Functions | 3m 5s
-
Demo: Recursive CTE Example | 3m 43s
-
Module Summary | 21s