20761-C Querying With T-SQL
20761-C Querying With T-SQL
Lessons
Introducing T-SQL
Understanding Sets
Understanding Predicate Logic
Understanding the Logical Order of Operations in SELECT statements
Lab : Introduction to T-SQL Querying
Executing Basic SELECT Statements
Executing Queries that Filter Data using Predicates
Executing Queries That Sort Data Using ORDER BY
After completing this module, you will be able to:
Lessons
Writing Simple SELECT Statements
Eliminating Duplicates with DISTINCT
Using Column and Table Aliases
Writing Simple CASE Expressions
Lab : Writing Basic SELECT Statements
Writing Simple SELECT Statements
Eliminating Duplicates Using DISTINCT
Using Column and Table Aliases
Using a Simple CASE Expression
After completing this module, you will be able to:
Describe the structure and format of the SELECT statement, as well as enhancements that will add
functionality and readability to your queries
Describe how to eliminate duplicates using the DISTINCT clause
Describe the use of column and table aliases
Understand and use CASE expressions
Lessons
Understanding Joins
Querying with Inner Joins
Querying with Outer Joins
Querying with Cross Joins and Self Joins
Lab : Querying Multiple Tables
Writing Queries that use Inner Joins
Writing Queries that use Multiple-Table Inner Joins
Writing Queries that use Self-Joins
Writing Queries that use Outer Joins
Writing Queries that use Cross Joins
After completing this module, you will be able to:
Lessons
Sorting Data
Filtering Data with Predicates
Filtering Data with TOP
Working with Unknown Values
Lab : Sorting and Filtering Data
Writing Queries that Filter Data using a WHERE Clause
Writing Queries that Sort Data Using an ORDER BY Clause
Writing Queries that Filter Data Using the TOP Option
After completing this module, you will be able to:
Explain how to add an ORDER BY clause to your queries to control the order of rows displayed
in your query's output
Explain how to construct WHERE clauses to filter out rows that do not match the predicate.
Explain how to limit ranges of rows in the SELECT clause using a TOP option.
Lessons
Using Aggregate Functions
Using the GROUP BY Clause
Filtering Groups with HAVING
Lab : Grouping and Aggregating Data
Writing Queries That Use the GROUP BY Clause
Writing Queries that Use Aggregate Functions
Writing Queries that Use Distinct Aggregate Functions
Writing Queries that Filter Groups with the HAVING Clause
After completing this module, you will be able to:
Describe the built-in aggregate function in SQL Server and write queries using it.
Write queries that separate rows using the GROUP BY clause.
Write queries that use the HAVING clause to filter groups.
Lessons
Writing Self-Contained Subqueries
Writing Correlated Subqueries
Using the EXISTS Predicate with Subqueries
Lab : Using Subqueries
Writing Queries That Use Self-Contained Subqueries
Writing Queries That Use Scalar and Multi-Result Subqueries
Writing Queries That Use Correlated Subqueries and an EXISTS Clause
After completing this module, you will be able to:
Lessons
Using Views
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)
After completing this module, you will be able to:
Lessons
Writing Queries with the UNION operator
Using INTERSECT
Lab : Using Set Operators
Writing Queries That Use UNION Set Operators and UNION ALL
Writing Queries That Use the INTERSECT Operators
After completing this module, students will be able to:
Lessons
Querying Data with Stored Procedures
Passing Parameters to Stored procedures
Creating Simple Stored Procedures
Lab : Executing Stored Procedures
Using the EXECUTE statement to Invoke Stored Procedures
Passing Parameters to Stored procedures
Executing System Stored Procedures
After completing this module, students will be able to:
Lessons
T-SQL Programming Elements
Controlling Program Flow
Lab : Programming with T-SQL
Declaring Variables and Delimiting Batches
Using Control-Of-Flow Elements
Lessons
Transactions and the database engines
Controlling transactions
Lab : Implementing Transactions
Controlling transactions with BEGIN, COMMIT, and ROLLBACK
After completing this module, students will be able to: