Querying Microsoft SQL Server 2012 training course contents
Introduction to Microsoft SQL Server
Management studio, creating and organizing T-SQL scripts, using books online.
Hands on: working with SQL Server tools.
Introducing T-SQL, sets, predicate logic, logical order of operations in SELECT statements, basic SELECT statements, queries that filter data using predicates, queries that sort data using ORDER BY.
Hands on: introduction to T-SQL querying.
Writing SELECT queries
Writing simple SELECT statements, eliminating duplicates with DISTINCT, column and table aliases, simple CASE expressions.
Hands on: writing basic SELECT statements.
Querying multiple tables
cross joins and self joins, write queries that use Inner joins, write queries that use multiple-table inner joins, write queries that use self-joins, write queries that use outer joins, write queries that use cross joins.
Hands on: querying multiple tables.
Sorting and filtering data
Sorting data, filtering data with predicates, filtering data with TOP and OFFSET-FETCH, working with unknown values, WHERE clause, ORDER BY clause, TOP option, OFFSET-FETCH clause.
Hands on: sorting and filtering data.
SQL Server data types
Introducing SQL Server data types, Character data, date and time data, queries that return date and time data, write queries that use date and time functions, write queries that return character data, write queries that return character functions.
Hands on: working with SQL Server data types.
Adding data to tables, modifying and removing data, generating automatic column values, Inserting records with DML, updating and deleting records using DML.
Hands on: using DML to modify data.
Queries with built-in functions, conversion functions, logical functions, functions with NULL, queries that use conversion functions, queries that use logical functions, queries that test for nullability.
Hands on: built-in functions
Grouping and aggregating data
Aggregate functions, the GROUP BY clause, filtering groups with HAVING, queries that use the GROUP BY clause, queries that use aggregate functions, queries that use distinct aggregate functions, queries that filter groups with the HAVING clause.
Hands on: grouping and aggregating data.
Self-contained subqueries, correlated subqueries, EXISTS predicate with subqueries, scalar and multi-result subqueries.
Hands on: subqueries.
Views, inline table-valued functions, derived tables, common table expressions. queries that use views, write queries that use derived tables, Common Table Expressions (CTEs), write queries that se inline Table valued expressions (TVFs).
Hands on: table expressions.
The UNION operator, EXCEPT and INTERSECT, APPLY, queries that use UNION set operators and UNION ALL, CROSS APPLY and OUTER APPLY operators.
Hands on: set operators.
Windows ranking, offset, and aggregate functions
OVER, window functions, ranking functions, offset functions, window aggregate functions. Hands on; windows ranking, offset, and aggregate functions.
Pivoting and grouping sets
PIVOT and UNPIVOT, grouping sets, queries that use the PIVOT operator, queries that use the UNPIVOT operator, queries that use the GROUPING SETS CUBE and ROLLUP subclauses.
Hands on: pivoting and grouping sets
Executing stored procedures
Querying data with stored procedures, passing parameters to stored procedures, simple stored procedures, dynamic SQL, the EXECUTE statement to invoke stored procedures.
Hands on: executing stored procedures.
Programming with T-SQL
T-SQL programming elements, controlling program flow, declaring variables and delimiting batches, control-of-flow elements, variables in a dynamic SQL statement, synonyms.
Hands on: programming with T-SQL
T-SQL error handling, structured exception handling, redirect errors with TRY/CATCH, THROW to pass an error message back to a client.
Hands on: implementing error handling.
Transactions and the database engines, controlling transactions, BEGIN, COMMIT, and ROLLBACK, adding error handling to a CATCH block.
Hands on: implementing transactions.