SQL Server T-SQL Recipes [electronic resource] /
Dye, David.author.
Brimhall, Jason.author.
Roberts, Timothy.author.
Sheffield, Wayne.author.
Sack, Joseph.author.
Gennick, Jonathan.author.
SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Tasks and their solutions are broken down into a problem/solution format that is quick and easy to read so that you can get the job done fast when the pressure is on. Solutions in this book are divided into chapters by problem domain. Each chapter is a collection of solutions around a single facet of the language such as writing queries, managing indexes, error handling, and query performance. Each solution is presented code-first, giving you a working code example to copy from and implement immediately in your own environment. Following each example is an in-depth description of how and why the given solution works. Tradeoffs and alternative approaches are also discussed. Focused on solutions: Look up what you need to do. Learn how to do it. Do it. Current: Lightly updated for SQL Server 2014 Comprehensive: Covers all common T-SQL problem domains.
""Contents at a Glance""; ""Contents""; ""About the Authors""; ""About the Technical Reviewer""; ""Acknowledgments""; ""Introduction""; ""Chapter 1: Getting Started with SELECT""; ""1-1. Connecting to a Database""; ""Problem""; ""Solution""; ""How It Works""; ""1-2. Checking the Database Server Version""; ""Problem""; ""Solution""; ""How It Works""; ""1-3. Checking the Database Name""; ""Problem""; ""Solution""; ""How It Works""; ""1-4. Checking Your Username""; ""Problem""; ""Solution""; ""How It Works""; ""1-5. Querying a Table""; ""Problem""; ""Solution""; ""How It Works""
""1-6. Returning Specific Rows""""Problem""; ""Solution""; ""How It Works""; ""1-7. Listing the Available Tables""; ""Problem""; ""Solution""; ""How It Works""; ""1-8. Naming the Output Columns""; ""Problem""; ""Solution""; ""How It Works""; ""1-9. Providing Shorthand Names for Tables""; ""Problem""; ""Solution""; ""How It Works""; ""1-10. Computing New Columns from Existing Data""; ""Problem""; ""Solution""; ""How It Works""; ""1-11. Negating a Search Condition""; ""Problem""; ""Solution""; ""How It Works""; ""1-12. Keeping the WHERE Clause Unambiguous""; ""Problem""; ""Solution""
""How It Works""""1-13. Testing for Existence""; ""Problem""; ""Solution""; ""How It Works""; ""1-14. Specifying a Range of Values""; ""Problem""; ""Solution""; ""How It Works""; ""1-15. Checking for Null Values""; ""Problem""; ""Solution""; ""How It Works""; ""1-16. Writing an IN- List""; ""Problem""; ""Solution""; ""How It Works""; ""1-17. Performing Wildcard Searches""; ""Problem""; ""Solution""; ""How It Works""; ""1-18. Sorting Your Results""; ""Problem""; ""Solution""; ""How It Works""; ""1-19. Specifying the Case-Sensitivity of a Sort""; ""Problem""; ""Solution""; ""How It Works""
""1-20. Sorting Nulls High or Low""""Problem""; ""Solution""; ""How It Works""; ""1-21. Forcing Unusual Sort Orders""; ""Problem""; ""Solution""; ""How It Works""; ""1-22. Paging Through a Result Set""; ""Problem""; ""Solution""; ""How It Works""; ""1-23. Sampling a Subset of Rows""; ""Problem""; ""Solution""; ""How It Works""; ""Chapter 2: Elementary Programming""; ""2-1. Executing T-SQL from a File""; ""Problem""; ""Solution""; ""How It Works""; ""2-2. Retrieving Values into Variables""; ""Problem""; ""Solution""; ""How It Works""; ""2-3. Writing Expressions""; ""Problem""; ""Solution""
""How It Works""""2-4. Deciding Between Two Execution Paths""; ""Problem""; ""Solution""; ""How It Works""; ""2-5. Detecting Whether Rows Exist""; ""Problem""; ""Solution""; ""How It Works""; ""2-6. Going to a Label in a Transact-SQL Batch""; ""Problem""; ""Solution""; ""How It Works""; ""2-7. Trapping and Throwing Errors""; ""Problem""; ""Solution""; ""How It Works""; ""2-8. Returning from the Current Execution Scope""; ""Problem""; ""Solution #1: Exit with No Return Value""; ""Solution #2: Exit and Provide a Value""; ""How It Works""; ""2-9. Writing a Simple CASE Expression""; ""Problem""
""Solution""
Includes index.
SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Tasks and their solutions are broken down into a problem/solution format that is quick and easy to read so that you can get the job done fast when the pressure is on. Solutions in this book are divided into chapters by problem domain. Each chapter is a collection of solutions around a single facet of the language such as writing queries, managing indexes, error handling, and query performance. Each solution is presented code-first, giving you a working code example to copy from and implement immediately in your own environment. Following each example is an in-depth description of how and why the given solution works. Tradeoffs and alternative approaches are also discussed. Focused on solutions: Look up what you need to do. Learn how to do it. Do it. Current: Lightly updated for SQL Server 2014 Comprehensive: Covers all common T-SQL problem domains.
Database management.
Programming languages (Electronic computers).
Database Management.
Programming Languages, Compilers, Interpreters.