Querying Microsoft SQL Server 2012 Duration: 5 Days Course Code: M10774 Overview: Deze cursus wordt vanaf 1 juli vervangen door cursus M20461 Querying Microsoft SQL Server. This course will be replaced by course M20461 Querying Microsoft SQL Server from July 1st.. This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft SQL Server 2012. This course is the foundation for all SQL Server-related discips; namely, Database Administration, Database Development and Business Intelligence. Target Audience: This course is intended for Database Administrators, Database Developers, and Business Intelligence professionals. The course will very likely be well attended by SQL power users who aren t necessarily database-focused or plan on taking the exam; namely, report writers, business analysts and client application developers. Objectives: After completing this course, students will be able to: Write SELECT Queries Query Multiple Tables Use Built-In Functions Use Subqueries Execute Stored Procedures Use Set Operators Implementing Transactions Use Table Expressions Sort and Filter Data Use Window Ranking, Offset and Aggregate Functions Query SQL Server Metadata Program with T-SQL Improve Query Performance Implement Error Handling Prerequisites: Testing and Certification Working knowledge of relational databases. This course helps people prepare for exam 70-461. Basic knowledge of the Microsoft Windows operating system and its core functionality. Follow-on-Courses:
Content: Module 1: Introduction to Microsoft SQL Server This module will introduce the use of This module introduces the use of existing 2012 subqueries in various parts of a SELECT stored procedures in a T-SQL querying statement. It will include the use of scalar and environment. It discusses the use of This module introduces the SQL Server multi-result subqueries, and the use of the IN EXECUTE, how to pass input and output platform and major tools. It discusses and EXISTS operators. parameters to a procedure, and how to invoke editions, versions, tools used to query, system stored procedures. documentation sources, and the logical Writing Self-Contained Subqueries structure of databases. Writing Correlated Subqueries SQL Server Denali Architecture Using the EXISTS Predicate with Lab : Executing Stored Procedures Working with SQL Server Denali Tools Write queries which use self-contained Use the EXECUTE statement to invoke Working with SQL Server Management subqueries stored procedures Studio Write queries which use correlated Pass parameters to stored procedures Exploring with Database Objects subqueries Return results from a stored procedure Organizing and Creating T-SQL Scripts Write queries which use scalar and using the OUTPUT clause multi-result subqueries Describe SQL Server components Write queries which use the IN and Invoke existing stored procedures with Create and save T-SQL scripts in SQL EXECUTE Server Management Studio Use self-contained subqueries, correlated Pass input parameters and receive output Browse the objects in a database subqueries, scalar subqueries, parameters Search T-SQL syntax definitions in Books andmulti-valued subqueries Generate dynamic SQL statements On Use the IN and EXISTS predicates Module 16: Programming with T-SQL Module 2: Introduction to Transact-SQL Module 10: Using Table Expressions Querying This module provides a basic introduction to This module introduces T-SQL expressions T-SQL programming concepts and objects. It This module introduces Transact SQL as the which return a valid relational table, typically discusses batches, variables, control of flow primary querying language of SQL Server. It for further use in the query. The elements such as loops and conditionals, how discusses the basic structure of T-SQL queries, modulediscusses views, derived tables, to create and execute dynamic SQL the logical flow of a SELECT statement, and common table expressions and in statements, and how to use synonyms. introduces concepts such as predicates and table-valued. set-based operations. Views Lab : Programming with T-SQL Introducing Transact-SQL Understanding Sets Write queries which use views Declaring variables and delimiting batches Understanding Predicate Logic Write queries which use derived tables Using control of flow elements Understanding the Logical Order of Write queries which use common table Generating dynamic SQL expressions Executing Basic SELECT Statements Write queries which use in Understand where T-SQL programming Executing queries which filter data using objects can be used predicates Write queries against views Declare variables and delimit batches Executing queries which sort data using Use derived tables Use control of flow elements such as IF, Use common table expressions WHILE, BEGIN, END, RETURN Describe the elements of T-SQL and its role Use in table-valued expressions Use synonyms in writing queries Describe the use of sets in SQL Server Module 11: Use Set Operators Module 17: Implementing Error Handling Describe the use of predicate logic in SQL Server Define the logical order of operations in This module introduces operations involving This module introduces the use of error SELECT statements multiple sets of data. It will cover the use of handlers in T-SQL code. It will introduce the the UNION, UNION ALL, APPLY, CROSS difference between compile errors and Module 3: Writing SELECT Queries APPLY, OUTER APPLY operators as well as run-time errors, and will cover how errors the EXCEPT and INTERSECTS operators. affect batches. The module will also cover how to control error handling using This module introduces the fundamentals of the TRY/CATCH blocks, the use of the ERROR SELECT statement, focusing on queries Lab : Use Set Operators class of, and the use of the new against a single table. THROW statement. Write queries which use UNION set Writing Simple SELECT Statements operators and UNION ALL multi-set Eliminating Duplicates with DISTINCT operators Lab : Implementing Error Handling Using Column and Table Aliases Write queries which use CROSS APPLY and OUTER APPLY operators Redirecting errors with TRY/CATCH Write simple SELECT statements Write queries which use APPLY with Creating error handling routines in a
Eliminate Duplicates using DISTINCT derived tables and CATCH block with ERROR Use table and column aliases Write queries which use EXCEPT and Using THROW to pass an error message Write Simple SELECT statements Describe the difference between a set Describe the behavior of SQL Server when Eliminate duplicates using the DISTINCT and a multi-set errors occur in T-SQL code clause Use the UNION and UNION ALL Use TRY/CATCH blocks to handle error Use column and table aliases operators flow Write simple CASE expressions Use CROSS APPLY, OUTER APPLY Understand ERROR class and APPLY Module 4: Querying Multiple Tables Use EXCEPT and INTERSECT operators Module 18: Implementing Transactions Module 12: Using Window Ranking, Offset This module explains how to write queries and Aggregate Functions This module introduces the concepts of which combine data from multiple sources in transaction management in SQL Server. It will SQL Server.The module introduces the use of provide a high-level overview of transaction JOINs in T-SQL queries as a mechanism for This module introduces window properties, cover the basics of marking retrieving data from multiple tables. including ranking, aggregate and offset transactions with BEGIN, COMMIT and. Much of this functionality is new to ROLLBACK. Understanding Joins SQL Server 2012. It will cover the use of Querying With Inner Joins T-SQL such as ROW_NUMBER, Querying With Outer Joins RANK, DENSE_RANK, NTILE, LAG, LEAD, Lab : Implementing Transactions FIRST_VALUE and LAST_VALUE to perform Write queries using inner joins calculations against a set, or window, of rows. Controlling transactions with BEGIN and Write queries using multi-table joins COMMIT Write queries using self joins Using XACT_ABORT Lab : Using Window Ranking, Offset and Adding transaction handling logic to a Describe how multiple tables may be Aggregate Functions queried in a SELECT statement using joins Describe the benefits of using transactions Write queries which use inner joins Write queries which use ranking Control transactions with BEGIN, Write queries which use outer joins Write queries which use offset COMMIT, ROLLBACK Write queries which use self-joins and cross Write queries which use window Describe error handling behavior in joins transactions Use window ranking Module 5: Sorting and Filtering Data ROW_NUMBER, RANK, DENSE_RANK, Module 19: Improving Query Performance NTILE Use offset LAG, LEAD, This module explains how to enhance queries FIRST_VALUE, LAST_VALUE This module introduces the concepts of to limit the rows they return, and to control the Use window aggregate system resource usage and the performance order in which the rows are displayed.the Use the basic forms of window impact of querying SQL Server 2012. It will module also discusses howto resolvemissing partitioning, window ordering and window cover, at a high level, the use of indexes in and unknown results. framing SQL Server, the use of execution plans in SQL Server Management Studio, and the use Sorting Data Module 13: Pivoting and Grouping Sets of SET options to view system resource Filtering Data usage when executing queries. It will also Filtering with the TOP and OFFSET-FETCH compare set-based operations with Options This module discusses techniques for pivoting cursor-based operations. data in T-SQL as well to introduce the Write queries that filter data using a WHERE fundamentals of the GROUPING SETS clause clause. It will also cover the use of GROUP Lab : Improving Query Performance Write queries that sort data with the ORDER BY ROLLUP and GROUP BY CUBE syntax in BY clause SQL Server 2012. Viewing query execution plans Write queries that filter data using the TOP Using SET STATISTICS statements option Viewing index usage Write queries that filter data using the Lab : Pivoting and Grouping Sets Comparing cursors to set-based Filter data with predicates in the WHERE Write queries which use the PIVOT Describe how SQL Server uses indexes to clause operator support query execution Sort data using ORDER BY Write queries which use the GROUPING Enable the display of execution plans in Filter data in the SELECT clause with TOP SETS subclause SQL Server Management Studio Filter data with OFFSET and FETCH Write queries which use GROUP BY Enable system IO and time information in Understand and handle NULLs ROLLUP query results Write queries which use GROUP BY Describe the differences between Module 6: Working with SQL Server Denali accessing data in sets versus via cursors Data Types Use the basic form of PIVOT and UNPIVOT operators Use the fundamental form of GROUPING
This module explains the data types SQL SETS clause Server uses to store data. Itintroduces the many types of numeric and special-use data Module 14: Querying SQL Server Metadata types.it also explains conversions between data types, and the importance of type precedence. This module introduces the use of SQL Introducing SQL Server Denali Data Types Server system objects in T-SQL queries. It Working with Character Data will cover the use of system catalog views, system stored procedures, system, Write queries which return date and time and dynamic management objects. data Write queries which use date and time Lab : Querying SQL Server Metadata Write queries which return character data Write queries which use character Querying system catalog views Querying system Describe numeric data types, type Querying system dynamic management precedence and type conversions Write queries using character data types Write queries against system catalog Write queries using date and time data views and types Execute system stored procedures Identify and query system dynamic Module 7: Using Built-In Functions management objects Describe security permissions necessary to query system objects This module introduces the use of that are built in to SQL Server Denali, and will Module 15: Executing Stored Procedures discuss some common usages including data type conversion, testing for logical results and nullability. Writing Queries with Built-In Functions Using Conversion Functions Using Logical Functions Write queries which use conversion Write queries which use logical Write queries with built-in scalar Use conversion Use logical Use that work with NULL Module 8: Grouping and Aggregating Data This module introduces methods for grouping data within a query, aggregating the grouped data and filtering groups with HAVING. The module is designed to help the student grasp why a SELECT clause has restrictions placed upon column naming in the GROUP BY clause as well as which columns may be listed in the SELECT clause.lessons Using Aggregate Functions Using the GROUP BY Clause Filtering Groups with the HAVING Write queries which use the GROUP BY clause Write queries which use aggregate Write queries which use distinct aggregate Write queries which filter groups with the
Write queries which summarize data using built-in aggregate Use the GROUP BY clause to arrange rows into groups Use the HAVING clause to filter out groups based on a search condition Module 9: Using Subqueries Additional Information: The Beta version of this course (10774AB) utilizes pre-release software in the virtual machine for the labs. Many of the exercises in this course are SQL Azure enabled. This course will be delivered with digital courseware. In order to have the best learning experience you are asked to bring your own second screen to view the courseware. A second screen includes: tablets and laptops. Further Information: For More information, or to book your course, please call us on 0800/84.009 info@globalknowledge.be www.globalknowledge.be