Book description
"Beginning T-SQLis a performance-oriented introduction to the T-SQL language underlying the Microsoft SQL Server database engine. T-SQL is essential in writing SQL statements to get data into and out of a database. T-SQL is the foundation for business logic embedded in the database in the form of stored procedures and functions.Beginning T-SQLstarts you on the path to mastering T-SQL,with an emphasis on best-practices and sound coding techniques leading to excellent performance. This new edition is updated to cover the essential features of T-SQL found in SQL Server 2014, 2012, and 2008.Beginning T-SQL begins with an introduction to databases, normalization, and to SQL Server Management Studio. Attention is given to Azure SQL Database and how to connect to remote databases in the cloud. Each subsequent chapter teaches an aspect of T-SQL, building on the skills learned in previous chapters. Exercises in most chapters provide an opportunity for the hands-on practice that leads to true learning and distinguishes the competent professional. Important techniques such as windowing functions are covered to help write fast executing queries that solve real business problems.A stand-out feature in this book is that most chapters end with a ""Thinking About Performance"" section. These sections cover aspects of query performance relative to the content just presented. They'll help you avoid beginner mistakes by knowing about and thinking about performance from Day 1.
"Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Foreword
- Chapter 1: Getting Started
- Chapter 2: Exploring Database Concepts
- Chapter 3: Writing Simple SELECT Queries
-
Chapter 4: Using Built-In Functions and Expressions
- Expressions Using Operators
- Using Mathematical Operators
- Using String Functions
- Nesting Functions
- Using Date and Time Functions
- Using Mathematical Functions
- Logical Functions and Expressions
- Administrative Functions
- Using Functions in the WHERE and ORDER BY Clauses
- The TOP Keyword
- Thinking About Performance
- Summary
-
Answers to the Exercises
- Solutions to Exercise 4-1: Expressions Using Operators
- Solutions to Exercise 4-2: Using Mathematical Operators
- Solution to Exercise 4-3: Using Functions
- Solution to Exercise 4-4: Using Date and Time Functions
- Solution to Exercise 4-5: Using Mathematical Functions
- Solution to Exercise 4-6: Using Logical and System Functions
- Solution to Exercise 4-7: Using Functions in the WHERE and ORDER BY Clauses
- Chapter 5: Joining Tables
- Chapter 6: Building on Subqueries, Common Table Expressions, and Unions
- Chapter 7: Grouping and Summarizing Data
-
Chapter 8: Discovering Windowing Functions
- What Is a Windowing Function?
- Ranking Functions
- Summarizing Results with Window Aggregates
- Defining the Window with Framing
- Calculating Running Totals
- Understanding the Difference Between ROWS and RANGE
- Using Window Analytic Functions
- Applying Windowing Functions
- Thinking About Performance
- Summary
- Answers to the Exercises
- Chapter 9: Advanced WHERE Clauses
-
Chapter 10: Manipulating Data
-
Inserting New Rows
- Adding One Row with Literal Values
- Avoiding Common Insert Errors
- Inserting Multiple Rows with One Statement
- Inserting Rows from Another Table
- Inserting Missing Rows
- Creating and Populating a Table in One Statement
- Inserting Rows into Tables with Default Column Values
- Inserting Rows into Tables with Automatically Populating Columns
- Deleting Rows
- Updating Existing Rows
- Thinking About Performance
- Summary
- Answers to the Exercises
-
Inserting New Rows
- Chapter 11: Writing Advanced Queries
- Chapter 12: Understanding T-SQL Programming Logic
- Chapter 13: Managing Transactions
- Chapter 14: Implementing Logic in the Database
- Chapter 15: Working with XML
- Chapter 16: Expanding on Data Type Concepts
- Chapter 17: Running SQL Server in the Cloud
- Chapter 18: Where to Go Next?
- Index
Product information
- Title: Beginning T-SQL
- Author(s):
- Release date: August 2014
- Publisher(s): Apress
- ISBN: 9781484200469
You might also like
book
Beginning T-SQL: A Step-by-Step Approach
Get a performance-oriented introduction to the T-SQL language underlying the Microsoft SQL Server and Azure SQL …
book
T-SQL Querying
T-SQL insiders help you tackle your toughest queries and query-tuning problems Squeeze maximum performance and efficiency …
book
Learn T-SQL Querying
Troubleshoot query performance issues, identify anti-patterns in code, and write efficient T-SQL queries Key Features Discover …
book
SQL Server T-SQL Recipes, Fourth Edition
SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the …