Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Microsoft

Program with Transact-SQL

Microsoft via Microsoft Learn

Overview

  • Module 1: Get started with Transact-SQL programming
  • After completing this module, you will be able to:

    • Describe the language elements of T-SQL used for simple programming tasks.
    • Describe batches and how they're handled by SQL Server.
    • Declare and assign variables and synonyms.
    • Use IF and WHILE blocks to control program flow.
  • Module 2: Create stored procedures and table-valued functions
  • After completing this module, you will be able to:

    • Return results by executing stored procedures.
    • Pass parameters to procedures.
    • Create simple stored procedures that encapsulate a SELECT statement.
    • Construct and execute dynamic SQL with EXEC and sp_executesql.
    • Create simple inline table-valued functions and write queries against them.
  • Module 3: Implement error handling with Transact-SQL
  • After completing this module, you will be able to:

    • Raise errors using the RAISERROR statement.
    • Raise errors using the THROW statement.
    • Use the @@ERROR system variable.
    • Create custom errors.
    • Create alerts that fire when errors occur.
  • Module 4: Implement transactions with Transact-SQL
  • After completing this module, you will be able to:

    • Describe transactions.
    • Compare transactions and batches.
    • Create and manage transactions.
    • Handle errors in transactions.
    • Describe concurrency.

Syllabus

  • Module 1: Get started with Transact-SQL programming
    • Introduction
    • Describe T-SQL for programming
    • Describe batches
    • Declare and assign variables and synonyms
    • Use IF and WHILE blocks to control program flow
    • Exercise: Program with T-SQL
    • Knowledge check
    • Summary
  • Module 2: Create stored procedures and table-valued functions
    • Introduction
    • Call stored procedures
    • Pass parameters to stored procedures
    • Create a stored procedure
    • Use dynamic SQL with EXEC and sp-execute-sql
    • Create inline table-valued functions
    • Exercise: Create stored procedures and table-valued functions
    • Knowledge check
    • Summary
  • Module 3: Implement error handling with Transact-SQL
    • Introduction
    • Implement T-SQL error handling
    • Implement structured exception handling
    • Exercise: Implement error handling with Transact-SQL
    • Knowledge check
    • Summary
  • Module 4: Implement transactions with Transact-SQL
    • Introduction
    • Describe transactions
    • Compare transactions and batches
    • Create and manage transactions
    • Handle errors in transactions
    • Describe concurrency
    • Exercise: Implement transactions with Transact-SQL
    • Knowledge check
    • Summary

Reviews

Start your review of Program with Transact-SQL

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.