Exam Ref 70-761 Querying Data with Transact-SQL
Itzik Ben-Gan
Exam Ref 70-761 Querying Data with Transact-SQL
Published with the authorization of Microsoft Corporation by:
Pearson Education, Inc.
Copyright 2017 by Itzik Ben-Gan
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, request forms, and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.
ISBN-13: 978-1-5093-0433-2
ISBN-10: 1-5093-0433-9
Library of Congress Control Number: 2017935711
First Printing April 2017
Trademarks
Microsoft and the trademarks listed at https://www.microsoft.com on the Trademarks webpage are trademarks of the Microsoft group of companies. All other marks are property of their respective owners.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The authors, the publisher, and Microsoft Corporation shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or programs accompanying it.
Special Sales
For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at or (800) 382-3419.
For government sales inquiries, please contact .
For questions about sales outside the U.S., please contact .
Editor-in-Chief
Greg Wiegand
Acquisitions Editor
Trina MacDonald
Development Editor
Troy Mott
Managing Editor
Sandra Schroeder
Senior Project Editor
Tracey Croom
Editorial Production
Backstop Media
Copy Editor
Christina Rudloff
Indexer
Julie Grady
Proofreader
Christina Rudloff
Technical Editor
Dejan Sarka
Cover Designer
Twist Creative, Seattle
This eBook was posted by AlenMiler on AvaxHome!
Many New eBooks in my Blog: http://avxhome.in/blogs/AlenMiler
Mirror: https://avxhome.unblocked.tw/blogs/AlenMiler
In memory of my dad, Gabriel Ben-Gan, who appreciated the
beauty of numbers, logic and puzzles.
Itzik
Contents at a glance
Contents
What do you think of this book? We want to hear from you!
Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you. To participate in a brief online survey, please visit:
https://aka.ms/tellpress
Introduction
The 70-761 exam focuses on T-SQL querying and programming constructs. Whether youre taking it as part of a Microsoft data platform related certification path, or to assess your T-SQL skills for any other reason, this is a crucial exam, since it covers the essential language constructs. If you need to do work with any of the Microsoft data platform technologies, a good grasp of T-SQL is vital.
The exam covers query constructs like filtering, grouping and sorting, combining data from multiple tables using joins, subqueries, set operators, modifying data, as well as some aspects of data definition like choosing data types and enforcing data integrity. The exam also covers more advanced query constructs like pivoting and unpivoting data, using window functions, grouping sets, using the APPLY operator, the complexities of NULLs, as well as implicit conversions. The exam covers querying system-versioned temporal tables, as well as XML and JSON data. The exam also covers T-SQL modules and programmatic constructs like views, user-defined functions, and stored procedures, as well as working with transactions and error handling.
This exam is intended for SQL Server database administrators, system engineers, and developers with two or more years of experience who are seeking to validate their skills and knowledge in writing queries.
This book covers every major topic area found on the exam, but it does not cover every exam question. Only the Microsoft exam team has access to the exam questions, and Microsoft regularly adds new questions to the exam, making it impossible to cover specific questions. You should consider this book a supplement to your relevant real-world experience and other study materials. If you encounter a topic in this book that you do not feel completely comfortable with, use the Need more review? links youll find in the text to find more information and take the time to research and study the topic. Great information is available on MSDN, TechNet, and in blogs and forums.
Organization of this book
This book is organized by the Skills measured list published for the exam. The Skills measured list is available for each exam on the Microsoft Learning website: https://aka.ms/examlist. Each chapter in this book corresponds to a major topic area in the list, and the technical tasks in each topic area determine a chapters organization. If an exam covers six major topic areas, for example, the book will contain six chapters.
Microsoft certifications
Microsoft certifications distinguish you by proving your command of a broad set of skills and experience with current Microsoft products and technologies. The exams and corresponding certifications are developed to validate your mastery of critical competencies as you design and develop, or implement and support, solutions with Microsoft products and technologies both on-premises and in the cloud. Certification brings a variety of benefits to the individual and to employers and organizations.
More Info All Microsoft certifications
For information about Microsoft certifications, including a full list of available certifications, go to https://www.microsoft.com/learning.
Acknowledgments
Itzik Ben-Gan Writing a book is a demanding yet rewarding project. A big part of what makes it rewarding is that you get to work with other people, and together create something that will hopefully contribute to increase technological and scientific knowledge out there. Id like to recognize those who were involved in this book for their contributions. Special thanks to Trina MacDonald, my editor, for your outstanding handling of the project. Many thanks to Dejan Sarak who tech edited the book, as well as wrote the section about querying XML and JSON data. I know I can always count on you both in terms of your depth of knowledge and ethics. Thanks, are also due to Troy Mott, the books Development Editor, Christina Rudloff, the Copy Editor, Ellie Volckhausen who handled the books layout, and Julie Grady, the books Indexer. Lastly, to Lilach, my wife, for helping with the first reviews, and for giving reason to what I do.