T-SQL Programming

Three days of Transact-SQL for developers and BI professionals writing production code against SQL Server. Covers advanced querying and set operations, window functions, data modification including MERGE, transactions and structured error handling, stored procedures, functions, triggers, temporal tables, safe dynamic SQL, and the query patterns that keep code performing as data grows. Delivered on SQL Server 2022 and 2025 with Azure SQL notes.

t-sql-programming

Intermediate

Databases

3 Days

Databases

databases

Online
On-site
Hybrid

T-SQL Programming

Three days of Transact-SQL for developers and BI professionals writing production code against SQL Server. Covers advanced querying and set operations, window functions, data modification including MERGE, transactions and structured error handling, stored procedures, functions, triggers, temporal tables, safe dynamic SQL, and the query patterns that keep code performing as data grows. Delivered on SQL Server 2022 and 2025 with Azure SQL notes.

Duration:
3 Days
Rating:
4.8/5.0
Level:
Intermediate
1500+ users onboarded

Who will Benefit from this Training?

Training Objectives

Build a high-performing, job-ready tech team.

Personalise your team’s upskilling roadmap and design a befitting, hands-on training program with Uptut

Key training modules

Comprehensive, hands-on modules designed to take you from basics to advanced concepts
Download Curriculum
  • T-SQL Foundations and Query Processing
    1. Logical query processing order and why it explains most surprises
    2. Three valued logic, nulls and predicate behaviour
    3. Data types, precedence and implicit conversion pitfalls
    4. Collation, comparison and sorting behaviour
    5. Batch structure, GO and variable scope
    6. Hands-on: debug a set of queries that return unexpected results
  • Advanced Querying and Set Operations
    1. Inner, outer, cross and self joins and reading the resulting row counts
    2. Correlated and non-correlated subqueries
    3. CROSS APPLY and OUTER APPLY for per-row evaluation
    4. UNION, INTERSECT and EXCEPT for comparison and reconciliation
    5. Common table expressions and recursive CTEs
    6. Hands-on: rewrite a nested legacy query into readable, verifiable steps
  • Window Functions and Analytical T-SQL
    1. OVER, PARTITION BY, ORDER BY and frame specification
    2. ROW_NUMBER, RANK, DENSE_RANK and NTILE
    3. LAG, LEAD, FIRST_VALUE and LAST_VALUE
    4. Running totals, moving averages and cumulative measures
    5. GROUPING SETS, ROLLUP and CUBE for subtotals
    6. Hands-on: build a period comparison report in a single query
  • Dates, Strings and Data Handling
    1. Date and time types, offsets and time zone handling
    2. Date arithmetic, boundaries and fiscal period calculation
    3. String functions, STRING_SPLIT and STRING_AGG
    4. Formatting, parsing and safe conversion with TRY_CONVERT
    5. Handling nulls with ISNULL, COALESCE and NULLIF
    6. Hands-on: clean and standardise a messy inbound dataset
  • Modifying Data Safely
    1. INSERT variants, SELECT INTO and bulk insert patterns
    2. UPDATE and DELETE with joins and their common mistakes
    3. MERGE syntax, use cases and the known caveats
    4. The OUTPUT clause for capturing changed rows
    5. Batched modification for very large tables
    6. Hands-on: implement an upsert and a batched delete on a large table
  • Transactions and Error Handling
    1. Explicit, implicit and autocommit transaction behaviour
    2. TRY CATCH structure and what it does and does not catch
    3. XACT_STATE, XACT_ABORT and doomed transactions
    4. THROW and RAISERROR and designing error contracts
    5. Savepoints, nested transactions and retry logic
    6. Hands-on: build a procedure that fails safely and retries correctly
  • Stored Procedures
    1. Procedure structure, parameters and output parameters
    2. Return values, result sets and calling conventions
    3. Parameter sniffing, plan reuse and RECOMPILE options
    4. Table valued parameters for set-based inputs
    5. Versioning, deployment and procedure coding standards
    6. Hands-on: build a parameterised procedure and stabilise its plan behaviour
  • Functions and Reusable Logic
    1. Scalar functions and their historic performance cost
    2. Inline table valued functions as the preferred pattern
    3. Multi-statement table valued functions and estimation problems
    4. Scalar UDF inlining and what changed in recent versions
    5. Deterministic functions, schema binding and indexed views
    6. Hands-on: convert a scalar function to an inline equivalent and compare plans
  • Views, Triggers and Temporal Tables
    1. Views, nesting depth and predicate pushdown behaviour
    2. Indexed views and their maintenance cost
    3. DML triggers, INSTEAD OF triggers and the inserted and deleted tables
    4. Trigger anti-patterns and multi-row correctness
    5. System versioned temporal tables for history and point-in-time queries
    6. Hands-on: implement temporal history and query the data as of a past date
  • Dynamic SQL and Secure Coding
    1. When dynamic SQL is justified and when it is not
    2. sp_executesql, parameterisation and plan reuse
    3. QUOTENAME and identifier handling
    4. SQL injection mechanics and defensive coding
    5. Execution context, EXECUTE AS and least privilege for procedures
    6. Hands-on: build a dynamic search procedure and prove it resists injection
  • JSON, XML and Writing for Performance
    1. JSON functions, OPENJSON and JSON path expressions
    2. FOR JSON and FOR XML output shaping
    3. XML data type, XQuery and when XML still applies
    4. SARGable predicates and writing code the optimiser can index
    5. Reading execution plans for your own procedures
    6. Code review checklist for production T-SQL
    7. Hands-on: capstone procedure delivered with tests and a plan review

Hands-on Experience with Tools

Training Delivery Format

Flexible, comprehensive training designed to fit your schedule and learning preferences
Opt-in Certifications
AWS, Scrum.org, DASA & more
100% Live
on-site/online training
Hands-on
Labs and capstone projects
Lifetime Access
to training material and sessions

How Does Personalised Training Work?

Skill-Gap Assessment

Analysing skill gap and assessing business requirements to craft a unique program

1

Personalisation

Customising curriculum and projects to prepare your team for challenges within your industry

2

Implementation

Supplementing training with consulting support to ensure implementation in real projects

3

Why this course

  • Set-based thinking: Cursors and row-by-row loops get replaced with set-based patterns, which is usually the single largest performance gain available.
  • Error handling that holds up: TRY CATCH, transaction state and retry logic are taught properly, because half-committed work is expensive to unwind.
  • Injection-safe by construction: Dynamic SQL is covered with parameterisation and quoting practices rather than avoided as too risky to teach.
  • Performance built into the writing: Participants read execution plans for their own code, so efficiency becomes a habit rather than a later tuning exercise.

Training objectives

  • Explain logical query processing order and use it to debug unexpected results
  • Write advanced joins, subqueries, set operators and APPLY expressions
  • Apply window functions for ranking, running totals and period comparison
  • Handle dates, strings, types and collations correctly
  • Modify data safely using INSERT, UPDATE, DELETE, MERGE and OUTPUT
  • Control transactions and implement structured error handling with TRY CATCH
  • Build maintainable stored procedures with appropriate parameter handling
  • Choose between scalar, inline and table valued functions on performance grounds
  • Implement triggers, views and temporal tables appropriately
  • Write dynamic SQL that is parameterised and injection resistant
  • Work with JSON and XML data in T-SQL
  • Read execution plans to validate that code performs at scale

Who will benefit

  • Application developers writing T-SQL against SQL Server
  • BI and reporting developers
  • Data engineers building SQL Server based pipelines
  • Database developers moving from Oracle, PostgreSQL or MySQL
  • Analysts progressing from ad hoc querying to production code

Lead the Digital Landscape with Cutting-Edge Tech and In-House " Techsperts "

Discover the power of digital transformation with train-to-deliver programs from Uptut's experts. Backed by 70,000+ professionals across the world's leading tech innovators.

Frequently Asked Questions

1. What are the pre-requisites for this training?
Faq PlusFaq Minus

The training does not require you to have prior skills or experience. The curriculum covers basics and progresses towards advanced topics.

2. Will my team get any practical experience with this training?
Faq PlusFaq Minus

With our focus on experiential learning, we have made the training as hands-on as possible with assignments, quizzes and capstone projects, and a lab where trainees will learn by doing tasks live.

3. What is your mode of delivery - online or on-site?
Faq PlusFaq Minus

We conduct both online and on-site training sessions. You can choose any according to the convenience of your team.

4. Will trainees get certified?
Faq PlusFaq Minus

Yes, all trainees will get certificates issued by Uptut under the guidance of industry experts.

5. What do we do if we need further support after the training?
Faq PlusFaq Minus

We have an incredible team of mentors that are available for consultations in case your team needs further assistance. Our experienced team of mentors is ready to guide your team and resolve their queries to utilize the training in the best possible way. Just book a consultation to get support.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.