Book description
Gain a solid understanding of T-SQL—and write better queries
Master the fundamentals of Transact-SQL—and develop your own code for querying and modifying data in Microsoft SQL Server 2012. Led by a SQL Server expert, you’ll learn the concepts behind T-SQL querying and programming, and then apply your knowledge with exercises in each chapter. Once you understand the logic behind T-SQL, you’ll quickly learn how to write effective code—whether you’re a programmer or database administrator.
Discover how to:
Work with programming practices unique to T-SQL
Create database tables and define data integrity
Query multiple tables using joins and subqueries
Simplify code and improve maintainability with table expressions
Implement insert, update, delete, and merge data modification strategies
Tackle advanced techniques such as window functions, pivoting and grouping sets
Control data consistency using isolation levels, and mitigate deadlocks and blocking
Take T-SQL to the next level with programmable objects
Table of contents
- Table of Contents
- Dedication
- Foreword
- Introduction
- 1. Background to T-SQL Querying and Programming
-
2. Single-Table Queries
- Elements of the SELECT Statement
- Predicates and Operators
- CASE Expressions
- NULL Marks
- All-at-Once Operations
-
Working with Character Data
- Data Types
- Collation
-
Operators and Functions
- String Concatenation (Plus Sign [+] Operator and CONCAT Function)
- The SUBSTRING Function
- The LEFT and RIGHT Functions
- The LEN and DATALENGTH Functions
- The CHARINDEX Function
- The PATINDEX Function
- The REPLACE Function
- The REPLICATE Function
- The STUFF Function
- The UPPER and LOWER Functions
- The RTRIM and LTRIM Functions
- The FORMAT Function
- The LIKE Predicate
-
Working with Date and Time Data
- Date and Time Data Types
- Literals
- Working with Date and Time Separately
- Filtering Date Ranges
-
Date and Time Functions
- Current Date and Time
- The CAST, CONVERT, and PARSE Functions and Their TRY_ Counterparts
- The SWITCHOFFSET Function
- The TODATETIMEOFFSET Function
- The DATEADD Function
- The DATEDIFF Function
- The DATEPART Function
- The YEAR, MONTH, and DAY Functions
- The DATENAME Function
- The ISDATE Function
- The FROMPARTS Functions
- The EOMONTH Function
- Querying Metadata
- Conclusion
- Exercises
- Solutions
- 3. Joins
- 4. Subqueries
- 5. Table Expressions
- 6. Set Operators
- 7. Beyond the Fundamentals of Querying
- 8. Data Modification
- 9. Transactions and Concurrency
- 10. Programmable Objects
- A. Getting Started
- Index
- About the Author
- Copyright
Product information
- Title: Microsoft® SQL Server® 2012 T-SQL Fundamentals
- Author(s):
- Release date: July 2012
- Publisher(s): Microsoft Press
- ISBN: 9780735673939
You might also like
video
React - The Complete Guide (Includes Hooks, React Router, and Redux) - Second Edition
**This course is now updated for the latest version of React—React 18** React.js is the most …
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
video
Angular - The Complete Guide [2023 Edition]
Learn all the fundamentals you need to know in order to get started developing Angular applications …
book
Java Cookbook, 4th Edition
Java continues to grow and evolve, and this cookbook continues to evolve in tandem. With this …