⚠️ This page has been archived

✅ New page with updated info: ssw.com.au/events

  • Duration
    • 4 days

You can book this course as a private training for your development Team. Call Marlon on 02 9953 3000 to find out pricing.


This course is intended for T-SQL developers, DBAs and SQL Server power users who work with SQL Server and need to write queries and develop code using Transact-SQL—SQL Server’s dialect of the standard ANSI-SQL language. The course covers querying, including retrieving and modifying data, and also provides an overview of programmable objects supported by SQL Server.
This course is intended both for people who just started working with SQL Server, as well as for people with some experience (for example, developers who are not SQL-focused). Even if you are a more experienced SQL Server practitioner, if you are self-taught and gained your knowledge “by the seat of your pants” and are looking for more organized training to cover gaps and holes in your knowledge, this course is for you. This course doesn’t get into performance discussions and advanced problems* rather focuses on the logical aspects of T-SQL. Note though that it is not merely a step-by-step course. It doesn’t just focus on syntactical elements of T-SQL, rather explains the logic behind the language and its elements.

There are many aspects of SQL that are unique to this language, and are very different than other programming languages. This course will help students adopt the right state of mind and get a true understanding of the language elements. Students will learn how to think in terms of sets and follow good SQL programming practices.
The course is not version specific; it does, however, cover language elements that were introduced in recent versions of SQL Server. Throughout the course the instructor will specify the version in which the elements were introduced.
The topics covered in the course include: Background to T-SQL Querying and Programming; Single-Table Queries; Joins; Subqueries; Table Expressions; Set Operations; Pivot, Unpivot and Grouping Sets; Data Modification; Transactions; Overview of Programmable Objects.

To complement the learning experience, students will be provided with exercises that will enable them to practice what they’ve learned.

Note: If you are a very experienced T-SQL practitioner and are looking for an Advanced T-SQL course that dives deeply into the complexities of T-SQL Querying and Programming including deep coverage of query and index tuning, please see the course Advanced T-SQL Querying Programming and Tuning for SQL Server.

Target Audience

This course is intended for:

  • SQL Server administrators who are responsible for the performance of their database servers and installations
  • SQL Server developers who are responsible for developing SQL Server queries and stored procedures


Before attending this course, it is recommended that students have the following skills:

  • Familiarity with basic relational database concepts and SQL

Course Objectives

Upon completion of this course, the student will be able to:

  • Understand the logic behind T-SQL and thinking in terms of sets
  • Write T-SQL code to create tables and define data integrity
  • Write queries against single and multiple tables
  • Write T-SQL statements that modify data
  • Get familiar with T-SQL programmable objects

Course Summary Outline

Module 01: Background to T-SQL Querying and Programming

  • Theoretical Background
    • SQL
    • Set Theory
    • Predicate Logic
    • Relational Model
    • Data Life Cycle
  • SQL Server Architecture
    • SQL Server Instances
    • Databases
    • Schemas and Objects
  • Creating Tables and Defining Data Integrity
    • Creating Tables
    • Defining Data Integrity

Module 02: Single-Table Queries

  • Elements of SELECT Statement
    • The FROM Clause
    • The WHERE Clause
    • The GROUP BY Clause
    • The HAVING Clause
    • The SELECT Clause
    • The ORDER BY Clause
    • The TOP Option
    • The OVER Clause
  • Predicates and Operators
  • CASE Expressions
  • NULLs
  • All-At-Once Operations
  • Working with Character Data
    • Data Types
    • Collation
    • Operators and Functions
    • LIKE Predicate
  • Working with Date and Time Data
    • Date and Time Data Types
    • Literals
    • Working with Date and Time Separately
    • Filtering Date Ranges
    • Date and Time Functions
  • Querying Metadata
    • Catalog Views
    • Information Schema Views
    • System Stored Procedures and Functions
      LAB 02A

Module 03: Joins

  • Cross Joins
    • ANSI SQL-92 Syntax
    • ANSI SQL-89 Syntax
    • Self Cross Join
    • Producing Tables of Numbers
  • Inner Joins
    • ANSI SQL-92 Syntax
    • ANSI SQL-89 Syntax
    • Inner Join Safety
  • Further Join Examples
    • Composite Join
    • Non-Equi Join
    • Multi-Table Joins
  • Outer Joins
    • Fundamentals of Outer Joins
    • Beyond the Fundamentals of Outer Joins
      LAB 03A

Module 04: Subqueries

    • Self-Contained Subqueries
    • Self-Contained Scalar Subquery Examples
    • Self-Contained Multi-Valued Subquery Examples
  • Correlated Subqueries
    • EXISTS
  • Beyond the Fundamentals of Subqueries
    • Returning Previous or Next Values
    • Running Aggregates
    • Misbehaving Subqueries
      LAB 04A

Module 05: Table Expressions

  • Derived Tables
    • Assigning Column Aliases
    • Using Arguments
    • Nesting
    • Multiple References
  • Common Table Expressions
    • Assigning Column Aliases
    • Using Arguments
    • Defining Multiple CTEs
    • Multiple References
    • Recursive CTEs
  • Views
    • Views and ORDER BY
    • View Options
  • Inline User Defined Functions
    LAB 05A

Module 06: Set Operations

  • The UNION Set Operation
    • The UNION ALL Set Operation
    • The UNION DISTINCT Set Operation
  • The INTERSECT Set Operation
    • The INTERSECT ALL Set Operation
    • The INTERSECT DISTINCT Set Operation
  • The EXCEPT Set Operation
    • The EXCEPT ALL Set Operation
    • The EXCEPT DISTINCT Set Operation
  • Precedence
  • Circumventing Unsupported Logical Phases
    LAB 06A

Module 07: Pivot, Unpivot and Grouping Sets

  • Pivoting Data
    • Standard Solution to Pivoting
    • Pivoting with the T-SQL PIVOT Operator
  • Unpivoting Data
    • Standard Solution to Unpivoting
    • Unpivoting with the T-SQL UNPIVOT Operator
  • Grouping Sets
    • GROUPING SETS Subclause
    • CUBE Subclause
    • ROLLUP Subclause
    • GROUPING and GROUPING_ID Functions
      LAB 07A

Module 08: Data Modification

  • Inserting Data
    • The INSERT VALUES Statement
    • The INSERT SELECT Statement
    • The INSERT EXEC Statement
    • The SELECT INTO Statement
    • The BULK INSERT Statement
    • The IDENTITY Property
  • Deleting Data
    • The DELETE Statement
    • The TRUNCATE Statement
    • DELETE Based on Join
  • Updating Data
    • The UPDATE Statement
    • UPDATE Based on Join
    • Assignment UPDATE
  • Merging Data
  • Modifying Data through Table Expressions
  • Modifications with TOP
    • INSERT with OUTPUT
    • DELETE with OUTPUT
    • UPDATE with OUTPUT
    • MERGE with OUTPUT
    • Composable DML
      LAB 08A

Module 09: Transactions and Concurrency

  • Transactions
  • Locks and Blocking
    • Locks
    • Troubleshooting Blocking
  • Isolation Levels
    • Read Uncommitted
    • Read Committed
    • Repeatable Read
    • Serializable
    • Snapshot Isolation Levels
    • Summary of Isolation Levels
  • Deadlocks
    LAB 09A

Module 10: Programmable Objects

  • Variables
  • Batches
    • A Batch as a Unit of Parsing
    • Batches and Variables
    • Statements that Cannot be Combined in the same Batch
    • A Batch as a Unit of Resolution
    • The GO n Option
  • Flow Elements
    • The IF ... ELSE Flow Element
    • The WHILE Flow Element
    • An Example of Using IF and WHILE
  • Cursors
  • Temporary Tables
    • Local Temporary Tables
    • Global Temporary Tables
    • Table Variables
    • Table Types
  • Dynamic SQL
    • The EXEC Command
    • The sp_executesql Stored Procedure
    • Using PIVOT with Dynamic SQL
  • Routines
    • User Defined Functions
    • Stored Procedures
    • Triggers
  • Error Handling

Location Details

Melbourne Mentor Francisco A González Díaz
Brisbane Mentor Francisco A González Díaz
Sydney Mentor Francisco A González Díaz

Other SolidQ Courses