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

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
  • Get started with Transact-SQL programming

    After completing this module, you'll 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.
  • This content is a part of Create stored procedures and user-defined functions.

    After completing this module, you'll 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 user-defined functions and write queries against them.

  • 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.
  • Implement transactions with Transact-SQL

    After completing this module, you'll be able to:

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

Syllabus

  • 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 Transact-SQL
    • Module assessment
    • Summary
  • Create stored procedures and user-defined functions
    • Introduction
    • Call stored procedures
    • Pass parameters to stored procedures
    • Create a stored procedure
    • Use dynamic SQL with EXEC and sp-execute-sql
    • Create user-defined functions
    • Exercise: Create stored procedures and table-valued functions
    • Module assessment
    • Summary
  • Implement error handling with Transact-SQL
    • Introduction
    • Implement T-SQL error handling
    • Implement structured exception handling
    • Exercise: Implement error handling with Transact-SQL
    • Module assessment
    • Summary
  • 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
    • Module assessment
    • 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.