Microsoft SQL Server 2016 and 2017 Programming
This 5 day course is intended for students new to querying and programming with Microsoft SQL Server products who need a total immersion in the subject on a SQL Server 2016 or 2017 platform. This is a very comprehensive and intensive course with plenty of illustrated examples and augmented with practical hands-on exercises to enhance the learning experience.
Additionally, with the course structure being fully modularised, customised versions of this course can also be devised and delivered to suit individual requirements. In fact, specific content from this course could also be combined with material from other related courses to produce a bespoke training package – just ask for details.
Students should be familiar with basic programming concepts and also understand the fundamental design of relational databases including, but not restricted to, the purpose of primary and foreign keys, entity relationships, and data normalization, such as can be found in the following course.
• SQL Server 2016 and 2017 Relational Database Design and Querying Fundamental
Upon successful completion of this course, students will be able to:
Identify the Tools and Components of SQL Server
Identifying the Elements of SSMS
Objects in a SQL Server Database
Synonyms
Database Diagrams
Components of a SQL Server Database Table
The Querying Environment
Creating a Script
Adding Comments to your Code
ANSI-SQL and Transact-SQL (T-SQL)
Categories of SQL Statements
Examine the Basic Syntax of the SELECT Statement
Using String Literals and Expressions
Retrieving Columns of Data from a Table
Using Aliases for Column Names
How to Use the WHERE Clause
Overview of Operators
Filter Data by Using Comparison Operators
Filter Data by Using String Comparisons
Filter Data by Using Logical Operators
Filter Data Using a Range of Values
Filter Data Using a List of Values
Filter Data with NULL Values
Filtering Date and Time Data
Sorting Data Using the ORDER BY Clause
Eliminating Duplicate Rows with DISTINCT
Introducing Native SQL Server Functions
Getting Help on Functions
Functions Relating to NULL Values
Using the CASE Expression
Native SQL Server Data Types
Data Type Precedence
Implicit Data Type Conversions
Explicit Data Type Conversion Functions
Working with Variables
Using Batches
Introduction to Joins
Using Inner Joins
Using Outer Joins
Using Cross Joins
Using Aliases for Table Names
Joining More than Two Tables
Joining a Table to Itself (Self Join)
Using Non-Equi Joins
Using Aggregate Functions Native to SQL Server
Using Aggregate Functions with NULL Values
Grouping Summarized Data with GROUP BY
Filtering Grouped Data Using the HAVING Clause
Using the ROLLUP and CUBE Operators
Using GROUPING SETS
Aggregate Window Functions
Ranking Functions
Analytic Window Functions
Combining Result Sets Using the UNION Operator
Using the EXCEPT and INTERSECT Operators
Using UNION, EXCEPT, and INTERSECT Together
Limiting Result Sets Using the TOP Operator
Using OFFSET/FETCH NEXT Filters
Introduction to Subqueries
Using Subqueries as Expressions and Derived Tables
Using Correlated Subqueries
Using EXISTS with Correlated Subqueries
Using the APPLY Operator
Temporary Tables
Using the PIVOT Operator
Using the UNPIVOT Operator
Introduction to Common Table Expressions
Using Common Table Expressions
Recursive Queries Using Common Table Expressions
Understanding SQL Server Date and Time Data Types
Querying and Modifying Date and Time Data
Native SQL Server Date and Time Functions
Guidelines and Techniques for Querying Dates
Inserting a Single Row into a Table
Inserting Multiple Rows into a Table
Inserting Values into Identity Columns
The SEQUENCE Object
Differentiating Various INSERT Statements
Using the OUTPUT Clause with INSERT
Deleting Rows from a Table
Truncating a Table
Deleting Rows Based on Data in Other Tables
Using the OUTPUT Clause with DELETE
Updating Rows in a Table
Updating Rows Based on Data in Other Tables
Using the OUTPUT Clause with UPDATE
The MERGE Statement
Practical Examples of Using MERGE
How SQL Server Modifies Data in Tables
Managing Transactions
Nested Transactions
Transaction Isolation Levels
Delayed Durability
SQL Server Locking Architecture
Managing Locks
Understanding SQL Server Index Architecture
Creating and Using Nonclustered Indexes
Creating and Using Clustered Indexes
Filtered Indexes
How SQL Server Processes T-SQL Queries
Examining Execution Plans
Dynamically Generating T-SQL Code
Writing Efficient Search Arguments
Overview of Views
Creating and Modifying a View
Guidelines for Creating Views
Examining the Impact of Using SELECT * in Views
Restrictions for Modifying Data by Using Views
Indexed Views
Partitioned Views
Control-of-Flow Language Statements
Logical Functions
Overview of Stored Procedures
How Stored Procedures Are Executed by SQL Server
Creating and Using a Stored Procedure
Parameterising Stored Procedures
Returning Values from a Stored Procedure
Using Table Valued Parameters (TVPs)
Controlling Execution Context
Parameter Sniffing
Using @@ERROR
Using RAISERROR
Using TRY…CATCH
Using the THROW Statement
Overview of User Defined Functions (UDFs)
Creating and Modifying Scalar UDFs
Creating and Modifying Table-Valued UDFs
Guidelines for Implementing UDFs
How Triggers Work
AFTER Triggers
INSTEAD OF Triggers
DDL Triggers
Appendix 1. Querying Metadata
Understanding Metadata
Querying Metadata by Using Views
Querying Metadata by Using Stored Procedures
Querying Metadata by Using Functions
Metadata Discovery in SQL Server
Appendix 2. Distributed Queries
Ad Hoc Distributed Queries
Linked Servers
Distributed Queries Against Linked Servers