MicrosoftSQLServer2012T-SQLFundamentals
PDF 格式电子书,英文版:This book walks you through your first steps in T-SQL (also known as Transact-SQL), which is the Microsoft SQL Server dialect of the ISO and ANSI standards for SQL. You’ll learn the theory behind T-SQL querying and programming and how to develop T-SQL code to query and modify data, anMicrosoftMicrosoft SQL Server2012T-SQL FundamentalsItzik ben-GanPublished with the authorization of Microsoft Corporation byO'Reilly media, Inc1005 Gravenstein Highway NorthSebastopolL California 95472Copyright o 2012 by Itzik Ben-GanAll rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by anymeans without the written permission of the publisher.SBN:978-0-735-65814-1123456789M765432Printed and bound in the united states of americaMicrosoft Press books are available through booksellers and distributors worldwide. If you need support relatedtothisbook,emailMicrosoftPressBookSupportatmspinput@microsoft.com.Pleasetelluswhatyouthinkofthisbookathttp://www.microsoft.com/learning/booksurveyMicrosoftandthetrademarkslistedathttp://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 oftheir respective ownersThe example companies, organizations, products, domain names, email addresses, logos, people, places, andevents depicted herein are fictitious. No association with any real company, organization, product, domain name,email address, logo, person, place, or event is intended or should be inferredThis book expresses the author's views and opinions. The information contained in this book is provided withoutany express, statutory, or implied warranties. Neither the author, O'Reilly Media, Inc, Microsoft Corporation, norits resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly orindirectly by this bookAcquisitions and developmental Editor: Russell JonesProduction Editor: Kristen BorgEditorial Production and Illustration: Online Training Solutions, IncTechnical Reviewer: Gianluca Hotz and herbert albertCopyeditor: Kathy KrauseIndexer: Allegro Technical IndexingCover Design: Twist Creative. SeattleCover Composition: Karen MontgomeryTo DatoTo live in hearts we leave behindIs not to die-THOMAS CAMPBELLContents at a glanceForewordⅩ/XIntroductionCHAPTER 1Background to T-SQL Querying and ProgrammingCHAPTER 2Single-Table queries27ChaPTER 3Joins99CHAPTER 4Subqueries129CHAPTER 5 Table Expressions157CHAPTER 6Set Operators191CHAPTER 7Beyond the Fundamentals of Querying211ChaPTER 8Data modification247ChaPTER 9Transactions and Concurrency297CHAPTER 10 Programmable Objects339APPENDIX A Getting Started375Index397About the author413ContentsForewordⅩXIntroductionChapter 1 Background to T-SQL Querying and Programming1Theoretical BackgroundSOLSet TheoryPredicate Logic4The relational model4The Data Life CycleSOL Server Architecture12The Abc Flavors of sQl server12SQL Server Instances14Databases15Schemas and objects18Creating Tables and Defining Data Integrity...19Creating Tables19Defining data IntegritconclusionChapter 2 Single-Table Queries27Elements of the select statement27The From Clause29The where clauseThe group BY ClauseWhat do you think of this book? We want to hear from you!Microsoft is interested in hearing your feedback so we can continually improve ourbooks and learning resources for you. To participate in a brief online survey, please visitmicrosoft. com/learning/ booksurvevThe having clause36The select clausThe order By clause.......42The ToP and OFFSET-FETCH Filters44A Quick Look at Window Functions48Predicates and Operators.....50CASE Expressions53NULL Marks55All-at-Once OperationsWorking with Character Data61ata type61Collation62Operators and Fu64The L/KE Predicate71Working with date and time data73Date and Time Data Types73Literals74Working with Date and Time SeparatelyFiltering date Ranges79Date and time functions.80Querying Metadata88Catalog Views88Information Schema Views......89System Stored Procedures and Functions89Conclusion91Exercis929292939494
下载地址
用户评论