consultas en ms sql server 2012

Post on 20-Feb-2017

189 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Querying Microsoft SQL Server 2012Consultas en MS SQL Server 2012

Ven Señor, sobre nuestros pensamientos, palabras y obras, a fin de que nuestro dia se agradable ante tus ojos.

Querido Dios abre sus ojos para que se salven y dejen la ignorancia y las ensenñanzas que han recibido.

Beshir Estefanos Kamel

El verdadero tesoroLa lámpara del cuerpo es el ojo; por eso, si tu ojo está sano, todo tu cuerpo estará lleno de luz. Pero si tu ojo está malo, todo tu cuerpo estará lleno de oscuridad. Así que, si la luz que hay en ti es oscuridad, ¡cuán grande será la oscuridad!

Mateo 6:22

Profesor de POO y Bases de Datos.

Carlos.Flores.Roman@gmail.comCarlos.Flores@dae.una.edu.ni

Cronograma• Todos los jueves• 5:30 pm – 8:00 pm

Expectativas• Audiencia– Con conocimientos básico e intermedio en MS SQL Server– Personas que estan considerando tomar el examen 70-461

;• Material Adicional–Microsoft Official Course 20461• Querying Microsoft SQL Server• Charla preparatoria para la certificación de Microsoft: Exa

men 461

• Microsoft Virtual Academy– Cursos en linea dirigidos por profesionales– Actualmente se encuentran registrados mas de 3M de

usuarios– Información actualizada y con una variedad de productos

MS– Cursos relacionados• Querying with Transact-SQL• Database Fundamentals

Unete a la comunidad MVA

Otras fuentes 1/2• Sitios que venden el servicio de entrenamiento– Learn on line– Pluralsight– Lynda

Course Topics1. Querying Microsoft SQL server 2012 with transact sql01 | Foundations of Querying 07 | Querying and Managing XML

Data02 | Getting Started with the SELECT Statement

08 | Creating Tables and Enforcing Data Integrity

03 | Filtering and Sorting Data 09 | Designing and Creating Views, Inline Functions, and Synonyms

04 | Combining Sets 10 | Inserting, Updating, and Deleting Data

05 | Grouping and Windowing 11 | Other Data Modification Aspects

06 | Querying Full-Text Data 12 | Implementing Transactions, Error Handling, and Dynamic SQL

Click to edit Master subtitle style

01 | Foundations of Querying

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview01 | Foundations of Querying• Lesson 1: Understanding the Foundations of T-SQL

– Evolution of T-SQL– Using T-SQL in a Relational Way– Using Correct Terminology

• Lesson 2: Understanding Logical Query Processing– T-SQL As a Declarative English-Like Language– Logical Query Processing Phases

Click to edit Master subtitle style02 | Getting Started with the

SELECT Statement

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview02 | Getting Started with the SELECT Statement• Lesson 1: Using the FROM and SELECT Clauses

– The FROM Clause– The SELECT Clause– Delimiting Identifiers

• Lesson 2: Working with Data Types and Built-in Functions– Choosing the Appropriate Data Type– Choosing a Data Type for Keys– Date and Time Functions– Character Functions– CASE Expression and Related Functions

Click to edit Master subtitle style

03 | Filtering and Sorting Data

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview03 | Filtering and Sorting Data• Lesson 1: Filtering Data with Predicates

– Predicates, Three-Valued Logic, and Search Arguments– Combining Predicates– Filtering Character Data– Filtering Date and Time Data

• Lesson 2: Sorting Data– Understanding When Order Is Guaranteed– Using the ORDER BY Clause to Sort Data

• Lesson 3: Filtering Data with TOP and OFFSET-FETCH– Filtering Data with TOP– Filtering Data with OFFSET-FETCH

Click to edit Master subtitle style

04 | Combining Sets

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview04 | Combining Sets• Lesson 1: Using Joins

– Cross Joins– Inner Joins– Outer Joins– Multi-Join Queries

• Lesson 2: Using Subqueries, Table Expressions, and the APPLY– Operator– Subqueries– Table Expressions– APPLY– Lesson 3: Using Set Operators– UNION and UNION ALL– INTERSECT– EXCEPT

Click to edit Master subtitle style

05 | Grouping and Windowing

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview05 | Grouping and Windowing• Lesson 1: Writing Grouped Queries

– Working with a Single Grouping Set– Working with Multiple Grouping Sets

• Lesson 2: Pivoting and Unpivoting Data– Pivoting Data– Unpivoting Data

• Lesson 3: Using Window Functions– Window Aggregate Functions– Window Ranking Functions– Window Offset Functions

Click to edit Master subtitle style

06 | Querying Full-Text Data

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview06 | Querying Full-Text Data• Lesson 1: Creating Full-Text Catalogs and Indexes

– Full-Text Search Components– Creating and Managing Full-Text Catalogs and Indexes

• Lesson 2: Using the CONTAINS and FREETEXT Predicates– The CONTAINS Predicate– The FREETEXT Predicate

• Lesson 3: Using the Full-Text and Semantic Search– Table-Valued Functions– Using the Full-Text Search Functions– Using the Semantic Search Functions

Click to edit Master subtitle style07 | Querying and Managing XML

Data

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview07 | Querying and Managing XML Data• Lesson 1: Returning Results As XML with FOR XML

– Introduction to XML– Producing XML from Relational Data– Shredding XML to Tables

• Lesson 2: Querying XML Data with XQuery– XQuery Basics– Navigation– FLWOR Expressions

• Lesson 3: Using the XML Data Type– When to Use the XML Data Type– XML Data Type Methods– Using the XML Data Type for Dynamic Schema

Click to edit Master subtitle style08 | Creating Tables and Enforcing

Data Integrity

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview08 | Creating Tables and Enforcing Data Integrity• Lesson 1: Creating and Altering Tables

– Introduction– Creating a Table– Altering a Table– Choosing Table Indexes

• Lesson 2: Enforcing Data Integrity– Using Constraints– Primary Key Constraints– Unique Constraints– Foreign Key Constraints– Check Constraints– Default Constraints

Click to edit Master subtitle style09 | Designing and Creating Views,

Inline Functions, and Synonyms

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview09 | …Views, Inline Functions, and Synonyms• Lesson 1: Designing and Implementing Views and Inline Functions

– Introduction– Views– Inline Functions

• Lesson 2: Using Synonyms– Creating a Synonym– Comparing Synonyms with Other Database Objects

Click to edit Master subtitle style10 | Inserting, Updating, and

Deleting Data

Carlos.Flores.Roman@gmail.com | Instructor

• Lesson 1: Inserting Data– Sample Data– INSERT VALUES– INSERT SELECT– INSERT EXEC– SELECT INTO

• Lesson 2: Updating Data– Sample Data– UPDATE Statement– UPDATE Based on Join– Nondeterministic UPDATE– UPDATE and Table Expressions– UPDATE Based on a Variable– UPDATE All-at-Once

• Lesson 3: Deleting Data– Sample Data– DELETE Statement– TRUNCATE Statement– DELETE Based on a Join– DELETE Using Table Expressions

Module Overview10 | Inserting, Updating, and Deleting Data

Click to edit Master subtitle style11 | Other Data Modification

Aspects

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview11 | Other Data Modification Aspects• Lesson 1: Using the Sequence Object and IDENTITY Column Property.

– Using the IDENTITY Column Property– Using the Sequence Object

• Lesson 2: Merging Data– Using the MERGE Statement

• Lesson 3: Using the OUTPUT Option– Working with the OUTPUT Clause– INSERT with OUTPUT– DELETE with OUTPUT– UPDATE with OUTPUT– MERGE with OUTPUT– Composable DML

Click to edit Master subtitle style12 | Implementing Transactions,

Error Handling, and Dynamic SQL

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview12 | …Transactions, Error Handling, and Dynamic SQL

• Lesson 1: Managing Transactions and Concurrency– Understanding Transactions– Types of Transactions– Basic Locking– Transaction Isolation Levels

• Lesson 2: Implementing Error Handling– Detecting and Raising Errors– Handling Errors After Detection– Lesson 3: Using Dynamic SQL– Dynamic SQL Overview– SQL Injection– Using sp_executesql

Click to edit Master subtitle style13 | Designing and Implementing

T-SQL Routines

Carlos.Flores.Roman@gmail.com | Instructor

• Lesson 1: Designing and Implementing Stored Procedures– Understanding Stored Procedures– Executing Stored Procedures– Branching Logic– Developing Stored Procedures

• Lesson 2: Implementing Triggers– DML Triggers– AFTER Triggers– INSTEAD OF Triggers– DML Trigger Functions

• Lesson 3: Implementing User-Defined Functions– Understanding User-Defined

Functions– Scalar UDFs– Table-Valued UDFs– Limitations on UDFs– UDF Options– UDF Performance Considerations

Module Overview13 | Designing and Implementing T-SQL Routines

Click to edit Master subtitle style14 | Using Tools to Analyze Query

Performance

Carlos.Flores.Roman@gmail.com | Instructor

Click to edit Master subtitle style17 | Implementing Indexes and

Statistics

Carlos.Flores.Roman@gmail.com | Instructor

Click to edit Master subtitle style16 | Understanding Cursors, Sets,

and Temporary Tables

Carlos.Flores.Roman@gmail.com | Instructor

Module Overview16 | … Cursors, Sets, and Temporary Tables• Lesson 1: Evaluating the Use of Cursor/Iterative Solutions vs. Set-Based

Solutions– The Meaning of "Set-Based"– Iterations for Operations That Must Be Done Per Row– Cursor vs. Set-Based Solutions for Data Manipulation Tasks

• Lesson 2: Using Temporary Tables vs. Table Variables– Scope– DDL and Indexes– Physical Representation in tempdb– Transactions– Statistics

©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

CRUDCRUD SQLCreate InsertRead SelectUpdate UpdateDelete Delete

top related