Vous êtes sur la page 1sur 10

70-461 Exam Guide Querying Microsoft SQL Server 2012

If you are looking for preparation materials for 70-461 exam querying Microsoft SQL Server 2012 than hopefully you will find this blog posts useful. You will see links that will point you directly to the area you want to study and you will see both our website links and comprehensive Microsoft documentation links. If you are new to SQL we suggest to start with our SQL Tutorial first. You can test your SQL Knowledge using our SQL Telephone Interview Questions. NOTE: These are interview questions NOT 70-461 exam questions so they may not represent exam topics.

Create Database Objects (24%)

Create and alter tables using T-SQL syntax (simple statements).

o o o

This objective may include but is not limited to: Create tables without using the built-in tools;

Our Links: SQL CREATE TABLE - Find out how to use CREATE TABLE. We start with very simple example and add extra options one step at a time. Microsoft Links: http://msdn.microsoft.com/enus/library/ms174979(v=sql.110).aspx Our links: SQL DROP TABLE - Short and easy to follow blog post that show how to remove table using SSMS Interface and SQL DROP TABLE Statement. Microsoft links: http://msdn.microsoft.com/enDROP TABLE us/library/ms173790(v=sql.110).aspx Microsoft Links: http://msdn.microsoft.com/en-

CREATE TABLE

ALTER TABLE

us/library/ms190273(v=sql.110).aspx Our Links:

ALTER COLUMN

SQL ALTER TABLE ADD COLUMN

Microsoft links: See Alter table above


Create and alter views (simple statements).

o o o

This objective may include but is not limited to: create views without using the built-in tools

Microsoft links: http://msdn.microsoft.com/en-

CREATE VIEW

us/library/ms187956(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

ALTER VIEW

us/library/ms173846(v=sql.110).aspx Our Links: SQL DROP VIEW - Short and easy to follow blog post that show how to remove view using SSMS Interface and SQL DROP TABLE Statement. Microsoft links: http://msdn.microsoft.com/en-

DROP VIEW

us/library/ms173492(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

Create indexed views

Design views.

us/library/ms191432(v=sql.110).aspx

o o

This objective may include but is not limited to:

I need to decode the exact requirement..... Many thanks to Cameron for decoding this requirement and here is decoded message with answers:

"Ensure that a legacy, non-recompiled application (which accesses a database;OLTP) is not broken (becomes unusable) because table schema (such as data types which might have been upgraded in SQL Server

ensure code non regression by 2012) is changed. keeping consistent signature This is accomplished by creating/modifying Views, for procedure, views, and function (interfaces) Stored Procedures, and Functions to emulate the

interface (signature) which the applications expects (to work successfully). So if tables, their columns, data types, constraints, etc. have been changed/updated, instead of doing what lazy programmers hate most (upgrading their applications), business continuity is ensured via the easier task of creating/modifying views to emulate (mimic) the data structure expected by the application (code)."

Microsoft link: http://msdn.microsoft.com/enus/library/ms187956.aspx icrosoft links: http://msdn.microsoft.com/en-

security implications
o o

us/library/ms187956.aspx

Create and modify constraints (simple statements). This objective may include but is not limited to:

Our Links: SQL CHECK Constraint - Find out how to restrict user values and ensure only good quality data is entered that meets business rules. Microsoft links: http://msdn.microsoft.com/en-

create constraints on tables

us/library/ms188066(v=sql.110).aspx Microsoft links:

define constraints

See above Our Links: SQL UNIQUE Constraint - Find out how to create UNIQUE Constraint and check two popular examples. Microsoft links:

unique constraints default constraints

See above Our links:

SQL DEFAULT CONSTRAINT - Find out how to provide default value during insert when not value is provided for the specified field.

Microsoft links: See above Our Links: SQL Primary Key Constraint - Find out how to add primary key using alter table statement. SQL Foreign Key Constraint - Find out how to add foreign key constraint using alter table statement. Microsoft links:

primary and foreign key constraints

Create and alter DML triggers.

See above

o o

This objective may include but is not limited to:

Microsoft links: http://msdn.microsoft.com/enus/library/ms189799(v=sql.110).aspx http://msdn.microsoft.com/en-

inserted and deleted tables;

us/library/ms176072(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

nested triggers;

us/library/ms190739(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

types of triggers; update functions;

us/library/ms178110(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

handle multiple rows in a session; us/library/ms190752(v=sql.110).aspx performance implications of triggers


Work with Data (27%) Query data by using SELECT statements.

o o

This objective may include but is not limited to:

Microsoft links: use the ranking function to select top(X) rows for multiple categories in a single query; http://msdn.microsoft.com/enus/library/ms189798(v=sql.110).aspx Our links: SQL Except Microsoft links:

write and perform queries efficiently using http://msdn.microsoft.com/enthe new code items such as synonyms and joins (except, intersect); us/library/ms188055(v=sql.105).aspx implement logic which uses dynamic SQL and system metadata write efficient, technically complex SQL queries, including all types of joins versus the use of derived tables; determine what code may or may not execute based on the tables provided; given a table with constraints, determine which statement set would load a table; use and understand different data access technologies; CASE versus ISNULL versus COALESCE

Implement sub-queries.

o o

This objective may include but is not limited to:

identify problematic elements in query plans;


Microsoft links: http://msdn.microsoft.com/en-

pivot and unpivot;

us/library/ms177410(v=SQL.105).aspx Microsoft links: http://msdn.microsoft.com/en-

apply operator;

us/library/ms175156(v=SQL.105).aspx Microsoft links: http://msdn.microsoft.com/en-

cte statement;

us/library/ms190766(v=SQL.105).aspx Microsoft links: http://msdn.microsoft.com/en-

with statement

Implement data types.

us/library/ms175972(v=sql.110).aspx

o o

This objective may include but is not limited to:

use appropriate data;

understand the uses and limitations of each data type;

SQL Server 2012 Data Types - Data Type is a very important concept in SQL Server and we in this article you give you overview of data types and show key information related to them.
QUICK ANSWER: newID is slower than newsequentialid. Articles to cover it will be included later on. QUICK ANSWER: newsequentialid is not entirely secure and you may guess the value...NewID is random and better for "randomization" (get truly random exactly 20 rows)

impact of GUID (newid, newsequentialid) on database performance, when to use which data type for columns

Implement aggregate queries.

Microsoft links: http://msdn.microsoft.com/en-us/library/ms190348.aspx http://msdn.microsoft.com/enus/library/ms189786(v=sql.110).aspx

o o

This objective may include but is not limited to:

Microsoft links:

new analytic functions; grouping sets;

http://msdn.microsoft.com/en-us/library/hh213234 Microsoft links: http://msdn.microsoft.com/en-

spatial aggregates; apply ranking functions

Query and manage XML data.

us/library/hh403400(v=sql.110).aspx

o o

This objective may include but is not limited to:

Microsoft links:

understand XML datatypes and their schemas and interoperability with limitations and restrictions;

http://msdn.microsoft.com/enus/library/ms189887(v=SQL.90).aspx Microsoft links:

implement XML schemas and handling of XML data;

http://msdn.microsoft.com/enus/library/ms176009(v=sql.110).aspx Microsoft links:

how to handle XML data in SQL Server and http://msdn.microsoft.com/enwhen and when not to use it, including XML namespaces; us/library/bb522446(v=sql.110).aspx import and export XML;
Microsoft links:

http://msdn.microsoft.com/enus/library/aa179112(v=SQL.80).aspx http://msdn.microsoft.com/enus/library/aa179108(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

XML indexing
Modify Data (24%) Create and alter stored procedures (simple statements).

us/library/ms191497(v=sql.110).aspx

o o

This objective may include but is not limited to:

Our Links: SQL DROP STORED

PROCEDURE - In this tutorial you will learn how to drop procedure Our own requirements: Create, Alter and Drop stored procedure (remove from database) using both interface and script.

Microsoft links:

write a stored procedure to meet a given set http://msdn.microsoft.com/enof requirements; us/library/ms190782(v=sql.110).aspx


Microsoft links: http://msdn.microsoft.com/en-

branching logic;

us/library/ms182717(v=sql.110).aspx Microsoft links:

create stored procedures and other programmatic objects; techniques for developing stored procedures;

http://msdn.microsoft.com/enus/library/ms187926(v=sql.110).aspx

different types of stored procedure results; create a stored procedure for data access layer; program stored procedures, triggers, and functions with T-SQL

QUICK ANSWER: Userdefined SP, Extended SP (Do not use; replaced with CLR) and system SP. Write article.

Modify data by using INSERT, UPDATE, and DELETE statements.

o o

This objective may include but is not limited to:

Microsoft links: http://msdn.microsoft.com/enus/library/ms174335(v=sql.110).aspx http://msdn.microsoft.com/en-

given a set of code with defaults, constraints, and triggers, determine the output of a set of DDL; know which SQL statements are best to solve common requirements;

us/library/ms177523(v=sql.110).aspx http://msdn.microsoft.com/enus/library/ms189835(v=sql.110).aspx

??
Microsoft links: http://msdn.microsoft.com/en-

use output statement

Combine datasets.

us/library/ms177564(v=sql.110).aspx

o o

This objective may include but is not limited to:

Our links: SQL UNION - Simple example of how to use union and comments related to UNION ALL Microsoft links:

difference between UNION and UNION http://msdn.microsoft.com/enall; us/library/ms180026(v=sql.110).aspx case vs. isnull vs. coalesce;
Microsoft links: http://msdn.microsoft.com/en-

modify data by using MERGE statements us/library/bb510625(v=sql.110).aspx

Work with functions.

o o

This objective may include but is not limited to:

Our Links: SQL DROP FUNCTION - Find out how to remove function (drop) from Our own requirements: How to create, alter and drop functions database using both interface and script. Microsoft links:

understand deterministic and nondeterministic functions;

http://msdn.microsoft.com/enus/library/aa214775(v=SQL.110).aspx

scalar and table values; apply built-in scalar functions;


Microsoft links: http://msdn.microsoft.com/enus/library/ms186755(v=sql.110).aspx

create and alter user-defined functions (UDFs)


Troubleshoot and Optimize Queries (25%) Optimize queries.

http://msdn.microsoft.com/enus/library/ms186967(v=sql.110).aspx

o o

This objective may include but is not limited to:

Microsoft links: http://msdn.microsoft.com/en-

understand statistics; read query plans; plan guides;

us/library/ms190397(v=sql.110).aspx

Microsoft links: http://msdn.microsoft.com/en-

DMVs;

us/library/ms188754(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

hints;

us/library/ms181714(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

statistics IO; us/library/ms184361(v=sql.110).aspx dynamic vs. parameterized queries; describe the different join types (HASH, MERGE, LOOP) and describe the scenarios in which they would be used

Manage transactions.

o o

This objective may include but is not limited to:

mark a transaction;
Microsoft links: http://msdn.microsoft.com/enus/library/ms174377(v=sql.110).aspx http://msdn.microsoft.com/enus/library/ms188929(v=sql.110).aspx

understand begin tran, commit, and rollback;

http://msdn.microsoft.com/enus/library/ms190295(v=sql.110).aspx

http://msdn.microsoft.com/enus/library/ms181299(v=sql.110).aspx Microsoft links:

implicit vs. explicit transactions;

http://msdn.microsoft.com/enus/library/ms187807(v=sql.110).aspx Microsoft links:

isolation levels; scope and type of locks;

http://msdn.microsoft.com/en-us/library/ms173763.aspx Microsoft links: http://msdn.microsoft.com/en-

trancount
o o

us/library/ms187967(v=sql.110).aspx

Evaluate the use of row-based operations vs. set-based operations. This objective may include but is not limited to:

when to use cursors; impact of scalar UDFs; combine multiple DML operations

Implement error handling.

o o

This objective may include but is not limited to:

Microsoft links: http://msdn.microsoft.com/en-

implement try/catch/throw; use set based rather than row based logic;

us/library/ms175976(v=sql.110).aspx Microsoft links: http://msdn.microsoft.com/en-

transaction management
Take care Katie & Emil

us/library/ms174377(v=sql.110).aspx