资源预览内容
第1页 / 共345页
第2页 / 共345页
第3页 / 共345页
第4页 / 共345页
第5页 / 共345页
第6页 / 共345页
第7页 / 共345页
第8页 / 共345页
第9页 / 共345页
第10页 / 共345页
亲,该文档总共345页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Microsoft SQL Server 2008T-SQL FundamentalsTable Of Contents1. Cover62. Copyright63. Acknowledgments74. Introduction85. Chapter 1. Background to T-SQL Querying and Programming105.1 Theoretical Background105.2 SQL Server Architecture175.3 Creating Tables and Defining Data Integrity215.4 Conclusion256. Chapter 2. Single-Table Queries266.1 Elements of the SELECT Statement266.2 Predicates and Operators486.3 CASE Expressions506.4 NULLs526.5 All-At-Once Operations566.6 Working with Character Data576.7 Working with Date and Time Data676.8 Querying Metadata796.9 Conclusion816.10 Exercises826.11 Solutions857. Chapter 3. Joins887.1 Cross Joins887.2 Inner Joins927.3 Further Join Examples947.4 Outer Joins977.5 Conclusion1067.6 Exercises1067.7 Solutions1118. Chapter 4. Subqueries1138.1 Self-Contained Subqueries1148.2 Correlated Subqueries1198.3 Beyond the Fundamentals of Subqueries1228.4 Conclusion1288.5 Exercises1288.6 Solutions1329. Chapter 5. Table Expressions1349.1 Derived Tables1359.2 Common Table Expressions1399.3 Views1449.4 Inline Table-Valued Functions1509.5 The APPLY Operator1519.6 Conclusion1549.7 Exercises1549.8 Solutions15910. Chapter 6. Set Operations16110.1 The UNION Set Operation16210.2 The INTERSECT Set Operation16410.3 The EXCEPT Set Operation16710.4 Precedence16910.5 Circumventing Unsupported Logical Phases17010.6 Conclusion17110.7 Exercises17210.8 Solutions17511. Chapter 7. Pivot, Unpivot, and Grouping Sets17711.1 Pivoting Data17811.2 Unpivoting Data18311.3 Grouping Sets18611.4 Conclusion19211.5 Exercises19211.6 Solutions19412. Chapter 8. Data Modification19712.1 Inserting Data19712.2 Deleting Data20512.3 Updating Data20712.4 Merging Data21112.5 Modifying Data Through Table Expressions21512.6 Modifications with the TOP Option21712.7 The OUTPUT Clause21812.8 Conclusion22412.9 Exercises22412.10 Solutions22813. Chapter 9. Transactions and Concurrency23013.1 Transactions23113.2 Locks and Blocking23313.3 Isolation Levels24113.4 Deadlocks25313.5 Conclusion25513.6 Exercises25514. Chapter 10. Programmable Objects26414.1 Variables26514.2 Batches26714.3 Flow Elements27014.4 Cursors27314.5 Temporary Tables27614.6 Dynamic SQL28114.7 Routines28614.8 Error Handling29314.9 Conclusion29615. Appendix A. Getting Started29715.1 Installing SQL Server29715.2 Downloading Source Code and Installing the Sample Database30715.3 Working with SQL Server Management Studio30815.4 Working with SQL Server Books Online31416. Itzik Ben-Gan31717. Additional Resources for Developers from Microsoft Press31717.1 Visual Basic31717.2 Visual C#31717.3 Web Development31817.4 Data Access31817.5 SQL Server 200531817.6 Other Developer Topics31918. More Great Developer Resources32018.1 Developer Step by Step32018.2 Developer Reference32118.3 Focused Topics32219. Index3233471. CoverMicrosoft SQL Server 2008 T-SQL Fundamentalsby Itzik Ben-GanPublisher: Microsoft PressPub Date: October 22, 2008Print ISBN-10: 0-7356-2601-4Print ISBN-13: 978-0-7356-2601-0Pages: 688Overview This essential reference is designed for database developers and administrators who need to write queries and develop code using Transact-SQL (T-SQL), the Microsoft implementation of the standard SQL language. Guided by SQL Server guru Itzik Ben-Gan, youll walk through the steps for writing queries, including retrieving and modifying data, with an overview of programmable objects supported by SQL Server 2008. Rather than focusing just on the syntactical elements of T-SQL, however, this book explains the logic behind the language - helping you develop a true, core understanding of the elements and how to use them. You will learn to think in terms of sets, and follow real-world best practices for T-SQL programming. To complement the learning experience, the book provides exercises to practice and apply what youve learned. And youll examine recommended solutions to compare with your own work. The entire books code samples will be available for download from the companion Web site.2. CopyrightPUBLISHEDBYMicrosoftPressADivisionofMicrosoftCorporationOneMicrosoftWayRedmond,Washington98052-6399Copyright 2009 by Itzik Ben-GanAll 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.Library of Congress Control Number: 2008938209Printed and bound in the United States of America.123456789QWT321098Distributed in Canada by H.B. Fenn and Company Ltd.A CIP catalogue record for this book is available from the British Library.Microsoft Press books are available through booksell
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号