Programming Microsoft
®
SQL Server
®
2012
Leonard Lobel
Andrew Brust
Published with the authorization of Microsoft Corporation by:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, California 95472
Copyright © 2012 by Sleek Technologies Inc., and Blue Badge Insights, Inc.
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any
means without the written permission of the publisher.
ISBN: 978-0-7356-5822-6
1 2 3 4 5 6 7 8 9 M 7 6 5 4 3 2
Printed and bound in the United States of America.
Microsoft Press books are available through booksellers and distributors worldwide. If you need support related
to this book, email Microsoft Press Book Support at mspinput@microsoft.com. Please tell us what you think of
this book at http://www.microsoft.com/learning/booksurvey.
Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/
Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property of
their respective owners.
The example companies, organizations, products, domain names, email addresses, logos, people, places, and
events depicted herein are ctitious. No association with any real company, organization, product, domain name,
email address, logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided without
any express, statutory, or implied warranties. Neither the authors, O’Reilly Media, Inc., Microsoft Corporation,
nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly
or indirectly by this book.
Acquisitions Editor: Russell Jones
Developmental Editor: Russell Jones
Production Editor: Melanie Yarbrough
Editorial Production: Christian Holdener, S4Carlisle Publishing Services
Technical Reviewer: John Paul Meuller
Copyeditor: Andrew Jones
Indexer: WordCo Indexing Services
Cover Design: Twist Creative • Seattle
Cover Composition: ContentWorks, Inc.
Illustrator: Rebecca Demarest
To my partner, Mark, and our children, Adam, Jacqueline,
Joshua, and Sonny. With all my love, I thank you guys, for all of
yours.
— Leonard LobeL
For my three boys: Miles, Sean, and Aidan. And for my sister,
Valerie Hope.
— andrew brust