Books

Learn T-SQL from Scratch: A beginner’s guide to T-SQL querying, SQL Server development, performance tuning, and deployment – 2nd Edition

Book overview

Description
Start your SQL Server and T-SQL journey with a clear, simple, and step-by-step guide that helps you build practical database skills from the ground up. You will learn DDL to create databases, schemas, tables, constraints, and indexes, and DML to retrieve and modify data. You will build advanced querying and analytical skills with joins, subqueries, CTEs, built-in functions, pivot, unpivot, rollup, and ranking and window functions.

You will use T-SQL features including temporary tables, cursors, WHILE loops, CASE expressions, IF…ELSE statements, transactions, error handling, concurrency controls, and isolation levels. You will create stored procedures, views, functions, and triggers; process XML and JSON; improve performance through indexing and tuning; troubleshoot issues; and deploy database solutions.

Updated for SQL Server 2022, this edition covers relevant features and practical topics without promising exhaustive coverage. It expands coverage of built-in functions, pivot, unpivot, rollup, cursors, concurrency concepts, isolation levels, performance tuning, and tips for writing efficient stored procedures.

What you will learn
● Create database objects and retrieve and modify data.
● Perform advanced querying and analysis with joins, subqueries, CTEs, pivot, unpivot, rollup, and window functions.
● Use T-SQL features, transactions, error handling, concurrency controls, and isolation levels.
● Develop stored procedures, views, functions, and triggers.
● Process XML and JSON data.
● Optimize, troubleshoot, and deploy database solutions.

Who this book is for
SQL for All is the core idea behind this book. Whether you are a student, fresher, aspiring database developer, data analyst, data engineer, or data enthusiast, this book is designed to make T-SQL and data literacy accessible, practical, and easy to learn. No prior experience is required—just a willingness to learn and explore the world of data.

Table of Contents
1. Getting Started
2. Tables
3. Indexes
4. DML
5. Built-In Functions – Part 1
6. Join, Apply, and Subquery
7. Built-In Functions – Part 2
8. Pivot and Unpivot
9. Dealing with XML and JSON
10. Variables and Control Flow Statements
11. Temporary Tables, CTE, and MERGE Statement
12. Cursors
13. Performance Tuning Essentials
14. Error Handling and Transaction Management
15. Data Conversion, Cross-Database, and Cross-Server Data Access
16. Programmability
17. Tips for Efficient Stored Procedures
18. Deployment