On December 15, 2024 at 8:35 UTC the platform will be unavailable for 5 minutes due to planned maintenance.

Advanced Course

Recursive Queries in MS SQL Server

Master the most challenging type of T-SQL queries. Learn how to process trees and graphs in T-SQL, and how to effectively organize long SQL queries.

4.84 ★★★★★ ★★★★★ (392 ratings)

5,383 learners enrolled

Lifetime access

limited to this course only

$39

Want a better deal?

Get unlimited lifetime access to all 76 present and future courses

Save $450

Unlimited lifetime access

to all 76 present and future courses

$149 $599

75% OFF

Free trial Yes

Certificate of completion Yes

Time to complete 18 h

Coding challenges 112

Skills you will gain

  • Understand and use basic Common Table Expressions
  • Split long T-SQL queries with simple and nested CTEs
  • Deploy recursive CTEs
  • Write recursive CTEs that traverse a hierarchical data model

Last reviews

Description

Description

Common Table Expressions (CTEs), often simply called WITH clauses, are essentially just named subqueries. They are a fairly new feature of T-SQL; with CTEs, you can break a long query into smaller chunks, which makes it more readable. Unlike T-SQL subqueries, CTEs can be recursive, allowing the traversal of hierarchical models of enormous depth.

About the Common Table Expressions in T-SQL Course
This course will cover simple CTEs, nested CTEs, and recursive CTEs. You will learn how to manage your T-SQL queries with CTEs, how and when to nest CTEs, and how to use recursive CTEs to move through hierarchical data models.

Cartoon person sitting in a binary tree with a laptop

This course is intended for intermediate users. We assume the user knows the basics of T-SQL, including:

  • How to select from a single table, including writing complex WHERE conditions
  • How to JOIN tables
  • How GROUP BY and HAVING work
  • How T-SQL subqueries work

What Are the Requirements?

  • A web browser
  • Knowledge of basic SQL, including JOINs and GROUP BY clauses

What Am I Going To Get from This T-SQL Course?

You will discover how to:
  • Understand and use basic Common Table Expressions
  • Split long T-SQL queries with simple and nested CTEs
  • Deploy recursive CTEs
  • Write recursive CTEs that traverse a hierarchical data model

Who Should Take This Course?

  • Beginning database analysts
  • Developers who want to keep their knowledge of T-SQL current
  • Students taking classes in relational databases
  • Anyone who wants to learn Common Table Expressions in T-SQL

Table of contents

Course progress 0%

Exercises completed 0/112

  1. Intro Quiz

    0/10

    Test your knowledge of T-SQL

  2. CTE syntax

    0/17

    Your first encounter with Common Table Expressions

  3. Nested CTEs

    0/15

    You'll learn how to use nested CTEs

  4. Recursive CTEs

    0/38

    You'll learn what recursion is and how to use it in T-SQL queries

  5. CTEs with INSERT, DELETE, and UPDATE

    0/18

    You'll learn how to use INSERT, DELETE, and UPDATE statements with CTEs

  6. Final Quiz

    0/14

    Test your knowledge in this final quiz

Get the Certificate of Competency in SQL

This certificate will confirm your practical SQL problem-solving skills

Reviews (13)

Average rating

4.84/5

★★★★★ ★★★★★ (392 ratings)

5 stars

86%

4 stars

14%

3 stars

0%

2 stars

0%

1 stars

0%