Learn T-SQL From Scratch: An Easy-to-Follow Guide for Designing, Developing, and Deploying Databases in the SQL Server and Writing T-SQL Queries Efficiently

Learn T-SQL from Scratch

Advance your career as an SQL Server developer and DBA


  • Cutting-edge coverage from community experts to learn T-SQL programming.
  • Detailed explanation of concepts and techniques for easy understanding.
  • Numerous practical demonstrations of T-SQL querying and programming applications.


This book will teach you the fundamentals of SQL, SQL Server, databases, and how to write queries and programs using T-SQL. After reading this book, you will be able to create, modify, and delete databases, tables, and indexes. You can practice querying the data and running complex analytics on it. You will also be able to add, delete, and modify procedures, user-defined functions, triggers, and views.

The journey of learning T-SQL with this book begins with an understanding of SQL and database fundamentals. You’ll explore the SQL Server Management Studio (SSMS) used for developing and managing SQL Server databases. You’ll then learn how to use DDL statements to create, modify and delete tables and indexes. Gradually, you’ll be able to query in T-SQL using DML statements, joins, and various built-in functions. Successively, you’ll learn XML and JSON data processing, and by the time you’ll reach the end of this book, you will learn to program in SQL Server and various strategies to deploy your databases and programs.

Throughout the book, you’ll learn through simple examples and straightforward explanations, diagrams, and numerous real-world use-cases.


  • Concise understanding of relational databases and the SQL Server.
  • Learn how to create database tables and indexes using T-SQL.
  • Learn to add, modify, and delete records.
  • Practice how to slice and dice data by running smart T-SQL queries.
  • Perform advanced analytical analysis using various functions.
  • Discover Error Handling and Transaction Management.
  • Administer XML and JSON handling with T-SQL.
  • Practice different deployment modes for T-SQL objects.


If you want to know how to design, develop, and maintain SQL Server databases and run sophisticated T-SQL queries without much hassle, this book is for you. Readers with a basic understanding of programming would have an advantage.

Table of Contents

  1. Getting started
  2. Tables
  3. Index
  4. DML
  5. Built-In Functions – Part 1
  6. Join, Apply, and Subquery
  7. Built-In Functions – Part 2
  8. Dealing with XML and JSON
  9. Variables and Control Flow Statements
  10. Temporary Tables, CTE, and MERGE Statement
  11. Error Handling and Transaction Management
  12. Data Conversion, Cross Database, and Cross-Server Data Access
  13. Programmability
  14. Deployment

Who can be benefitted more from this book

This book will turn out to be the best mate for anyone who wishes to build their career in T-SQL and SQL Server, especially the Computer Science and Information Technology graduates and freshers. They can refer to this book and develop a strong foundation and skills in SQL Server and T-SQL, not only to crack the interviews but also to excel in their career.

QA people and Business Analysts can gift themselves this book and grow in their career by gaining knowledge of SQL.

Even the Jr. and mid-level SQL Server Developers and Administrators can gift themselves this book to strengthen their foundation and clear their fundamentals of SQL Server and T-SQL. They can also refresh their knowledge with this book. DBA’s who wish to explore their career in Development shall surely find this book a game-changer.

SQL FOR ALL, that’s the intent behind this book. You know Excel, you can easily learn T-SQL Querying and Programming using this book.