This module describes the elements of T-SQL and their role in writing queries. Describe the use of sets in SQL Server. Describe the use of predicate logic in SQL Server. Describe the logical order of operations in SELECT statements.
Understanding Predicate Logic
Understanding the Logical Order of Operations in SELECT statements
Lab : Introduction to Transact-SQL Querying
Executing Basic SELECT Statements
Executing Queries that Filter Data using Predicates
Previously in this course, you learned about using subqueries as an expression that returned results to an outer calling query. Like subqueries, table expressions are query expressions, but table expressions extend this idea by allowing you to name them and to work with their results as you would work with data in any valid relational table. Microsoft SQL Server 2016 supports four types of table expressions: derived tables, common table expression (CTEs), views, and inline table-valued functions (TVFs). In this module, you will learn to work with these forms of table expressions and learn how to use them to help create a modular approach to writing queries.
Using Inline Table-Valued Functions
Using Derived Tables
Using Common Table Expressions
Lab : Using Table Expressions
Writing Queries That Use Views
Writing Queries That Use Derived Tables
Writing Queries That Use Common Table Expressions (CTEs)
Writing Queries That Sue Inline Table-Valued Expressions
This module describes the benefits to using window functions. Restrict window functions to rows defined in an OVER clause, including partitions and frames. Write queries that use window functions to operate on a window of rows and return ranking, aggregation, and offset comparison results.
Creating Windows with OVER
Exploring Window Functions
Lab : Using Windows Ranking, Offset, and Aggregate Functions
Writing Queries that use Ranking Functions
Writing Queries that use Offset Functions
Writing Queries that use Window Aggregate Functions
This module describes how 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.
Querying Data with Stored Procedures
Passing Parameters to Stored procedures
Creating Simple Stored Procedures
Working with Dynamic SQL
Lab : Executing Stored Procedures
Using the EXECUTE statement to Invoke Stored Procedures