Transact-SQL (T-SQL) Programming (2 days)
TSQ-66: Fixed price Transact SQL training delivered on your site at any UK location.
COURSE OUTLINE |
pricing | more Transact SQL training |
Providing a solid grounding in procedural programming techniques for SQL Server / Transact-SQL (T-SQL) developers, this course is aimed at those with sound experience of SQL basics (on any platform). Variables, Conditional Processing, Stored Procedures, User defined Functions, DML Triggers and Error Handling are covered in a highly practical and modular environment so that attendees learn by doing. Working in a tutorial style environment, one to one interaction is facilitated and encouraged.On completion, a comprehensive set of course notes, examples, tutor and attendee scripts are provided on a free USB pen drive to take away.
Suggested Prerequisites
This is a course for those with sound experience of SQL basics (on any platform).
T-SQL Views Reviewed
- Views Explained
- Important Points About Views
- Creating Views
- Removing Views
- Updating through a View
- Using the WITH CHECK Option
Introducing Procedural Programming
- Declarative vs Procedural
- Batch processing and GO
- The Need for BEGIN ... END
- Creating and Using Variables
- Scalar Variables and Table Variables
- Making Use of Temporary Tables
Conditional Processing
- IF ... ELSE
- Remember the Basics!
- Comparison Operators
- LIKE, NOT, BETWEEN, IN()
- The EXISTS Keyword
- BREAK, CONTINUE, RETURN
- GOTO
- WAITFOR
Harnessing T-SQL Stored Procedures
- Stored Procedure Basics
- Designing, Creating and Compiling
- Executing Stored Procedures
- Modifying and Deleting
- Passing Parameters to Stored Procedures
- Using Return Codes
- Stored Procedures and Management Studio
- Viewing Stored Procedures
- Working with Table Valued Parameters
Understanding User Defined Functions (UDFs)
- User Defined Function Basics
- Types of Functions
- User Defined Function Guidelines
- Deterministic and Nondeterministic Functions
- Creating and Executing User Defined Functions
- Viewing User Defined Functions
Implementing Error Handling
- Understanding Database Engine Errors
- Handling database Engine Errors
- Using TRY ... CATCH
- Retrieving Error Information
- RAISERROR, PRINT and @@ERROR
Using DML Triggers
- Introducing DML Triggers
- Creating DML Triggers
- Deleting and Disabling DML Triggers
- Using the Deleted and Inserted Tables
- Implementing INSTEAD OF Triggers
- DML Triggers vs Constraints

"Again excellent, Bob, you were a great teacher. Thank you for all your help! :-)."
Senior Information Analyst
NHS Sefton
(Bootle)