Advanced Querying Microsoft SQL Server with Transact-SQL
About the course
The Advanced Querying Microsoft SQL Server with Transact-SQL course is designed to give delegates practical experience in using more complex Transact-SQL techniques. This course covers Microsoft SQL Server up to version 2016.
The delegate will learn and acquire skills as follows:
- Creating and using Views
- Using table expressions
- Enhanced Grouping and Pivoting Data
- Using Windowing ranking, offset and ranking functions
- Creating and using Stored Procedures
- Controlling Program Flow
- Using Dynamic SQL
- Implementing Error Handling
- Improving Query Performance
Who will the course benefit?
IT Professionals and non-technical 'power users' who are required to implement more complex Transact-SQL queries.
A working knowledge of SQL is required along with practical experience in writing SQL statements. This can be obtained by attendance on the pre-requisite Querying Microsoft SQL Server with Transact-SQL course.
- Querying Microsoft SQL Server with Transact-SQL
- Programming Microsoft SQL Server with Transact-SQL
- Course technical content is subject to change without notice.
- Course content is structured as sessions, this does not strictly map to course timings. Concepts, content and practicals often span sessions.
This course will cover some of the topics required for exams 70-461: Querying Microsoft SQL Server and 70-761:Querying Data with Transact-SQLrespectively.
Before taking any exam, ensure you have the recommended experience. The Microsoft website lists all exam requirements and these are updated regularly.
Exams are not included as part of the course.
To provide more advanced coding skills for those already familiar with using basic Transact-SQL or as a follow-on course for those who have previously attended the Querying Microsoft SQL Server with Transact-SQL course.
Course Contents - DAY 1
- Administration and Course Materials
- Course Structure and Agenda
- Delegate and Trainer Introductions
Session 1: USING TABLE EXPRESSIONS
- Creating and using Views
- Using Inline Table-Valued Functions
- Using Derived Tables
- Using Common Table Expressions
Session 2: PIVOTING AND ENHANCED GROUPING
- Using PIVOT and UNPIVOT in Queries
- Working with GROUPING SETS
- Using ROLLUP, CUBE,GROUPING and GROUPING_ID
Session 3: USING WINDOWING FUNCTIONS
- Using Window AGGREGATE functions in Queries
- Using Window RANK functions in Queries
- Using Window OFFSET functions in Queries
Course Contents - DAY 2
Session 4: IMPLEMENTING STORED PROCEDURES
- Overview of Stored Procedures
- Creating simple Stored Procedures
- Executing Stored Procedures
- Passing parameters to Stored Procedures
Session 5: PROGRAMMING WITH TRANSACT-SQL
- Using Programming Elements in Transact-SQL
- Controlling Program Flow with IF/ELSE
- Controlling Program Flow with WHILE
- Working with Dynamic SQL
Session 6: IMPLEMENTING ERROR HANDLING
- Structured error handling with TRY / CATCH block
- Unstructured error handling
- Generating error message using THROW and RAISEERROR
- Error handling in conjunction with Transaction Control
Session 7: IMPROVING QUERY PERFORMANCE
- Factors in Query Performance
- Displaying Query Performance Data