Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
T-SQL Expert: Complete Microsoft SQL Server Training
Rating: 4.4 out of 5(14 ratings)
169 students

T-SQL Expert: Complete Microsoft SQL Server Training

Learn T-SQL from scratch with 146+ hands-on lectures covering queries, joins, functions, stored procedures & performance
Created byVitalii Shumylo
Last updated 10/2025
English

What you'll learn

  • Write advanced T-SQL queries with complex joins, subqueries, window functions, and set operations to solve real-world business problems efficiently.
  • Create and manage stored procedures with dynamic SQL, parameter handling, error management, and transaction control for robust database applications.
  • Master SQL Server data types, built-in functions, views, CTEs, and performance optimization techniques to build high-performing database solutions.
  • Query system catalogs, analyze performance data, and implement best practices for T-SQL programming and database administration tasks.

Course content

1 section146 lectures20h 52m total length
  • Installing Microsoft Windows Server4:43

    Install Windows Server in Hyper-V to prepare for SQL Server, create a virtual machine, enable Hyper-V features, and choose the GUI edition of Windows Server 2022.

  • Installing Microsoft SQL Server6:21

    Install and configure Microsoft SQL Server on a local server, including downloading SQL Server on premises, installing management tools, and setting up Git and Visual Studio Code.

  • Installing Sample Database3:43
  • About T-SQL6:13
  • Introduction to T-SQL: Elements, Categories, and Basic Concepts9:03
  • Demo Example: Queries using fundamental T-SQL elements8:45
  • Introduction to T-SQL: Expressions, Comment, Batch Separators7:24

    Master expressions, comments, and batch separators in t-sql, and learn to use variables and basic control flow to build robust queries and manage code in batches.

  • Demo Example 1: T-SQL Expressions and Control Flow Basics7:50
  • Demo Example 2: T-SQL Expressions and Control Flow Basics15:16
  • Sets and SQL Server6:45

    Learn to think in sets for T-SQL, using set-based processing over procedural code, ensuring unique identifiers and proper ordering with order by to optimize SQL Server queries.

  • Hands-On demo Example: Sets and SQL Server6:29

    Learn how sets drive efficient sql server queries with practical examples in the Adventureworks database, including top n selects, defining primary keys, and set based grouping and ordering.

  • T-SQL Column Aliases on Naming Conventions and Best Practices6:31
  • T-SQL Sales Analysis with Column Aliases and Price Calculations10:10
  • SQL Query Structure in Business Report Analysis Example9:06

    Learn to structure a business report query by joining the sales order header with territory, salesperson, and person tables using select, join, group by, and order by.

  • Using 'AS' in Business Report Generation Example with SQL6:35
  • Using CASE Expressions in SELECT Clauses5:44
  • Demo: Writing Simple CASE Expressions9:25

    Master simple case expressions with the Adventureworks 2022 database to categorize total due as low, medium, or high in the sales order header table, using where and order by.

  • Lab Tasks: Writing Basic SELECT Statements9:03
  • Lab Solution Demo: Writing Basic SELECT Statements12:50
  • Knowledge Check: Writing Basic SELECT Statements4:59
  • Understanding Joins. The FROM Clause and Virtual Tables8:18
  • Demo: Understanding Joins. The FROM Clause and Virtual Tables11:55
  • Overview of Join Types. Cartesian Product. T-SQL Syntax Choices8:50
  • Demo: T-SQL Syntax Choices9:03
  • Demo: Cartesian Product and Join Types11:54
  • Querying with Inner Joins9:10

    Master inner joins to query data across multiple tables, using on and where clauses, ansi sql 92 syntax, aliases, and both single and composite joins for accurate results.

  • Demo 1: Querying with Inner Joins13:09

    Explore inner joins in SQL using practical examples, including simple, composite, and multi-table joins; use aliases and distinct to retrieve only matching rows across customers, orders, and details.

  • Demo 2: Querying with Inner Joins12:38
  • Querying with Outer Joins10:13
  • Demo 1: Querying with Outer Joins10:40
  • Demo 2: Querying with Outer Joins7:40

    Demonstrate left, right, and full outer joins on the Adventureworks 2022 database to preserve unmatched rows with nulls and identify customers without orders using null tests.

  • Querying with Cross Joins and Self Joins8:21
  • Demo 1: Querying with Cross Joins and Self Joins7:44
  • Demo 2: Querying with Cross Joins and Self Joins6:33

    Explore self joins and cross joins in T-SQL with practical examples that link employees to their managers and generate all row combinations, including unmatched cases.

  • Sorting Data5:55
  • Demo: Sorting Data7:18
  • Filtering Data with Predicates6:34
  • Demo: Filtering Data with Predicates9:30
  • Filtering Data with TOP and OFFSET-FETCH7:22

    Learn to filter ranges of rows with the top option and offset fetch, using order by, with ties, and paging for deterministic results.

  • Demo: Filtering Data with TOP and OFFSET-FETCH9:55
  • Working with Unknown Values5:04
  • Demo: Working with Unknown Values7:56
  • Introducing SQL Server Data Types8:34
  • Other Data Types6:00
  • Demo: Introducing SQL Server Data Types12:14
  • Demo: When Are Data Types Converted?6:13
  • Working with Character Data12:11

    Explore character data in SQL Server, covering non-Unicode and Unicode types, collation, and case sensitivity, plus string concatenation, and text functions like substring, charindex, replace, and format.

  • Demo: Working with Character Data13:07

    Learn to work with character data in SQL Server, covering collation and case sensitivity, string concatenation with plus and concat, and built-in string functions and like pattern matching.

  • Working with Date and Time Data10:38
  • Demo: Working with Date and Time Data15:19
  • Adding Data to Tables7:11
  • Demo: Adding Data to Tables9:17
  • Modifying and Removing Data7:17
  • Demo: Modifying and Removing Data16:10
  • Generating Numbers6:32

    Explore generating numbers in SQL Server using the identity property and the sequence object, including syntax, use cases, constraints, and cross-table coordination for unique identifiers and sequential values.

  • Writing Queries with Built-In Functions9:47
  • Demo: Writing Queries with Built-In Functions9:05

    Master built-in SQL Server functions, including scalar, aggregate, and ranking functions, with practical examples on date parts, absolute values, data type casting, counts, sums, and rankings.

  • Using Conversion Functions8:50
  • Demo: Using Conversion Functions8:37
  • Using Logical Functions6:16
  • Demo: Using Logical Functions7:22
  • Functions to Work with NULL5:25
  • Demo: Functions to Work with NULL12:09
  • Using Aggregate Functions9:49

    Explore built-in aggregate functions in SQL Server to summarize data across rows, including sum, avg, min, max, and count, while handling nulls and using distinct and group by.

  • Demo 1: Using Aggregate Functions9:14
  • Demo 2: Using Aggregate Functions12:10
  • Using the GROUP BY Clause8:57
  • Demo: Using the GROUP BY Clause10:28
  • Filtering Groups with HAVING7:37
  • Demo: Filtering Groups with HAVING12:26
  • Writing Self-Contained Subqueries8:44
  • Demo: Writing Self-Contained Subqueries10:16

    Explore scalar and multi-valued subqueries in T-SQL, including self-contained subqueries that run independently. Use max to fetch most recent orders, and apply in predicates or joins for readability and maintainability.

  • Writing Correlated Subqueries7:30
  • Demo: Writing Correlated Subqueries12:20

    Discover how correlated subqueries in T-SQL depend on the outer query and execute per row for dynamic calculations, with notes on testing, debugging, and performance.

  • Using the EXISTS Predicate with Subqueries7:37

    Explore how the exists predicate accelerates existence tests in subqueries, compare it to count and not exists, and learn practical queries for matching and non-matching rows in SQL Server.

  • Demo: Using the EXISTS Predicate with Subqueries7:47
  • Using Views5:48
  • Demo: Using Views12:39
  • Using Inline TVFs6:25

    Master inline TVFs to encapsulate reusable logic and return parameterized virtual tables in SQL Server, enabling dynamic, modular queries that combine the reusability of views with function flexibility.

  • Demo: Using Inline TVFs9:24
  • Using Derived Tables8:51
  • Demo: Using Derived Tables13:01
  • Using CTEs (Common Table Expressions)8:45
  • Demo: Using CTEs (Common Table Expressions)12:08
  • Writing Queries with the UNION Operator6:36
  • Demo: Writing Queries with the UNION Operator4:59
  • Using EXCEPT and INTERSECT8:06
  • Demo: Using EXCEPT and INTERSECT5:06
  • Using APPLY7:25
  • Demo: Using APPLY15:45
  • Creating Windows with OVER9:35
  • Demo 1: Creating Windows with OVER12:12
  • Demo 2: Creating Windows with OVER12:17

    Explore how to create windows with the over clause in SQL Server, using partition by, order by, and framing to compute running totals and cumulative sums.

  • Exploring Window Functions10:00
  • Demo 1: Creating Views for Exploring Window Functions Lab11:25

    Explore window functions for calculations across rows while preserving granularity and use views as reusable virtual tables to simplify complex queries in sql.

  • Demo 2: Creating Views for Exploring Window Functions Lab8:59

    Create views to simplify complex queries by joining employees, orders, and order details to calculate total sales per employee by year, enabling reuse for streamlined data analysis.

  • Demo 3: Exploring Window Functions Lab8:19

    Explore window functions in T-SQL by ranking products with rank and dense_rank over unit price, and compare gaps versus dense_rank for reporting.

  • Demo 4: Exploring Window Functions Lab8:43
  • Writing Queries with PIVOT and UNPIVOT6:15
  • Demo 1: Writing Queries with PIVOT and UNPIVOT6:12
  • Demo 2: Writing Queries with PIVOT and UNPIVOT11:25
  • Querying Data with Stored Procedures8:27
  • Demo 1: Querying Data with Stored Procedures5:35
  • Demo 2: Querying Data with Stored Procedures7:11
  • Passing Parameters to Stored Procedures7:42
  • Demo 1: Passing Parameters to Stored Procedures3:33

    Explore how to work with stored procedure parameters in T-SQL, including input and output parameters, and discover definitions using SSMS and system catalog queries to write flexible, reusable queries.

  • Demo 2: Passing Parameters to Stored Procedures7:29
  • Demo 3: Passing Parameters to Stored Procedures7:11
  • Demo 4: Passing Parameters to Stored Procedures6:24

    Explore passing parameters to stored procedures in T-SQL, test with variable declarations and output parameters, handle batch scope with go, debug typos, and clean up by dropping procedures.

  • Demo 5: Passing Parameters to Stored Procedures9:07

    Learn how to create, alter, drop, and test stored procedures in t-sql, including organizing scripts, using separation lines, and verifying procedure existence.

  • Demo 6: Passing Parameters to Stored Procedures7:15

    Discover, define, and use input and output parameters in stored procedures, explore parameters graphically with SSMS, and retrieve parameter metadata from system catalog views.

  • Creating Simple Stored Procedures4:49
  • Working with Dynamic SQL7:03
  • Demo 1: Working with Dynamic SQL6:05

    Master dynamic sql in t-sql by executing runtime queries, comparing the exact statement and sp execute sql stored procedure, and leveraging parameters and query plan reuse for security.

  • Demo 2: Working with Dynamic SQL5:12
  • T-SQL Programming Elements10:30

    Learn to create and submit batches, declare and use variables, and work with synonyms in T-SQL, mastering batch boundaries, scope, and object aliases for flexible, efficient scripting.

  • Demo 1: T-SQL Programming Elements8:33
  • Demo 2: T-SQL Programming Elements9:11
  • Controlling Program Flow8:29
  • Demo1: Controlling Program Flow6:14
  • Demo2: Controlling Program Flow5:19
  • Implementing T-SQL Error Handling. Part 16:12

    Raise errors and use throw in T-SQL to signal issues, capture error details, and set up alerts for critical conditions. Distinguish system and custom errors; custom numbers start at 50,000,001.

  • Implementing T-SQL Error Handling. Part 25:41
  • Demo: Implementing T-SQL Error Handling10:53
  • Implementing Structured Exception Handling10:20
  • Demo: Implementing Structured Exception Handling7:21
  • Transactions and the Database Engine8:46
  • Demo 1: Transactions and the Database Engine8:58
  • Demo 2: Transactions and the Database Engine9:20
  • Controlling Transactions8:19
  • Demo: Controlling Transactions8:44
  • Factors in Query Performance. Part 18:52
  • Factors in Query Performance. Part 28:30
  • Demo 1: Factors in Query Performance6:54
  • Demo 2: Factors in Query Performance6:54

    Compare cursors and set-based operations to optimize T-SQL queries for performance. The demo shows calculating max order date per employee with a cursor and contrasts it with a set-based solution.

  • Demo 3: Factors in Query Performance6:15
  • Displaying Query Performance Data7:57

    Learn how SQL Server uses execution plans to analyze query performance, compare estimated and actual plans, view graphical plans in SSMS, and identify bottlenecks to inform indexing and tuning.

  • Demo: Displaying Query Performance Data9:50

    Explore how SQL Server execution plans and query performance data reveal how queries run and where to optimize with estimated and actual plans, statistics time, and statistics IO.

  • Querying System Catalog Views and Functions8:04
  • Demo 1: Querying System Catalog Views and Functions8:40
  • Demo 2: Querying System Catalog Views and Functions9:19
  • Executing System Stored Procedures8:50
  • Demo: Executing System Stored Procedures9:15
  • Querying Dynamic Management Objects7:55

    Explore dynamic management objects in SQL Server to retrieve real-time metadata and state information. Learn how DMOs are categorized and queried as views and table-valued functions for monitoring and troubleshooting.

  • Demo 1: Querying Dynamic Management Objects6:49
  • Demo 2: Querying Dynamic Management Objects6:26

Requirements

  • No prior SQL or database experience required - this course starts from absolute basics and guides you step-by-step through every concept.
  • Basic computer skills and familiarity with Windows environment is helpful but not essential - everything is explained clearly for complete beginners.

Description

Complete T-SQL Mastery Course Description

Master Microsoft SQL Server with the most comprehensive T-SQL training available online!

Transform yourself from a complete beginner to a confident T-SQL professional with this extensive 146-lecture course designed to take you through every aspect of Microsoft SQL Server database development and querying.

What You'll Learn

Foundation & Setup: Start with complete SQL Server installation, sample database setup, and T-SQL fundamentals including syntax, expressions, and basic concepts that form the backbone of database programming.

Query Mastery: Master SELECT statements, column aliases, CASE expressions, and advanced filtering techniques using predicates, TOP, and OFFSET-FETCH clauses to retrieve exactly the data you need.

Advanced Joins & Relationships: Become proficient with all join types including INNER, OUTER, CROSS, and SELF joins, understanding how to work with multiple tables and create complex data relationships.

Functions & Data Types: Work confidently with built-in functions, conversion functions, logical functions, NULL handling, and aggregate functions while mastering SQL Server's comprehensive data type system.

Subqueries & Advanced Techniques: Write powerful self-contained and correlated subqueries, use EXISTS predicates, and implement sophisticated querying strategies for complex business requirements.

Database Objects: Create and utilize views, inline table-valued functions (TVFs), derived tables, and Common Table Expressions (CTEs) to build reusable and maintainable database solutions.

Set Operations & Window Functions: Master UNION, EXCEPT, INTERSECT operations, and leverage the power of window functions with OVER clauses for advanced analytical queries.

Stored Procedures & Programming: Develop robust stored procedures with parameter passing, dynamic SQL generation, and complete T-SQL programming including variables, control flow, and error handling.

Performance & Optimization: Understand query performance factors, analyze execution plans, and implement best practices for optimal database performance.

System Administration: Query system catalog views, execute system stored procedures, and work with dynamic management objects for database monitoring and administration.

Why This Course?

With over 140 hands-on demonstrations and real-world examples, you'll gain practical experience that directly applies to professional database development. Each concept is reinforced with multiple demo sessions, ensuring you understand not just the theory but can implement solutions confidently.

Whether you're starting your database career, transitioning from other database systems, or looking to deepen your SQL Server expertise, this course provides the comprehensive foundation you need to succeed in today's data-driven world.

Enroll now and join thousands of students who have transformed their careers with T-SQL mastery!

Who this course is for:

  • IT professionals, software developers, and system administrators who need to add T-SQL and SQL Server skills to advance their careers and job prospects.
  • Data analysts, business analysts, and reporting professionals who want to query databases directly instead of relying on others for data extraction.
  • IT professionals who want to start a career in database development, data analysis, or business intelligence with no prior SQL experience required.
  • Students and career changers looking to break into the lucrative database field with comprehensive, hands-on training that employers actually value.