BPB Online LLP
Learn T-SQL From Scratch
Brahmanand Shukla
Learn T-SQL From Scratch
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews

Advance your career as an SQL Server developer and DBA

Key Features
● 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.

Description
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.

What you will learn
● 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..

Who this book is for
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

Language
English
ISBN
9789391392413
Cover Page
Title Page
Copyright Page
Forewords
Dedication Page
About the Author
About the Reviewers
Acknowledgement
Preface
Errata
1. Getting Started
Structure
Objectives
Database
Table, row, and column
DBMS
RDBMS
De-normalization
Normalization
Entity Relationship (ER)
Constraints
Primary Key
Foreign key
Trigger
ACID
Transaction
Atomicity (A)
Consistency (C)
Isolation (I)
Durability (D)
T-SQL
SQL
T-SQL commands
Data Definition Language (DDL)
Data Manipulation Language (DML)
Transaction Control Language (TCL)
Data Control Language (DCL)
SQL Server physical architecture
Quick summary of SQL Server physical architecture
SQL Server version and editions
SQL Server download and installation
SQL Server Management Studio (SSMS)
Getting started with SSMS
Object Explorer
Query editor
Parse (Ctrl + F5)
Execute (F5)
Results to Text (Ctrl + T)
Results to Grid (Ctrl + D)
Results to File (Ctrl + F)
Comment out the selected lines (Ctrl + K + C)
Uncomment out the selected lines (Ctrl + K + U)
Increase indent
Decrease indent
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
2. Tables
Structure
CREATE DATABASE
USE DATABASE
CREATE SCHEMA
Data types
String
Binary
Numeric (non-decimal values)
Numeric (decimal values)
Approximate floating point numeric data types
Date and time
Boolean
More on data types
CREATE TABLE
Three-part naming
ALTER TABLE
DROP TABLE
What is NULL?
Primary Key constraint
NOT NULL constraint
UNIQUE constraint
Primary Key versus UNIQUE constraint
DEFAULT constraint
CHECK constraint
Foreign Key constraint
CASCADING in Foreign Key
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
3. Index
Structure
Objective
Index
Rowstore indexes
Clustered index
Non-clustered index
Covering index
Filtered index
Unique index
Columnstore indexes
Clustered columnstore index
Non-clustered columnstore index
Filtered columnstore index
DROP INDEX
Indexes in practical
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
4. DML
Structure
Objective
INSERT statement
SELECT statement
SELECT *
SELECT-specific columns
Filtering
Wildcard search
Range search
Sorting
Paging
TOP
UPDATE statement
DELETE statement
TRUNCATE statement
Magic tables (inserted and deleted tables)
OUTPUT clause with INSERT statement
OUTPUT clause with DELETE statement
OUTPUT clause with UPDATE statement
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
5. Built-In Functions - Part 1
Structure
Objective
Aggregate functions
GROUP BY
HAVING
SUM ()
COUNT ()
COUNT (<column name>)
COUNT (*)
COUNT (DISTINCT <column name>)
AVG ()
MIN ()
MAX ()
Aggregate functions with INSERT
String functions
LEFT ()
RIGHT ()
SUBSTRING ()
REPLACE ()
LEN ()
LTRIM ()
RTRIM ()
LOWER ()
UPPER ()
SPACE ()
REPLICATE ()
REVERSE ()
CHARINDEX ()
QUOTENAME ()
STRING_SPLIT ()
Numeric functions
ABS ()
ISNUMERIC ()
ROUND ()
FLOOR () and CEILING ()
POWER ()
RAND ()
Date functions
GETDATE ()
ISDATE ()
DATEPART ()
DATEADD ()
DATEDIFF ()
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
6. Join, Apply, and Subquery
Structure
Objective
JOIN
VLOOKUP in Excel vs JOIN
INNER JOIN
One-to-one relationship
One-to-many relationship
Many-to-many relationship
OUTER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
APPLY
CROSS APPLY
OUTER APPLY
Subquery
Types of subqueries
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
7. Built-In Functions – Part 2
Structure
Objective
Window functions
Aggregate functions
T-SQL example of aggregate windowing functions
Ranking functions
ROW_NUMBER ()
RANK ()
DENSE_RANK ()
NTILE ()
T-SQL example of ranking functions
Analytic functions
T-SQL example of analytic functions
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
8. Dealing with XML and JSON
Structure
Objective
Dealing with XML data
XQuery
Filtering data using XQuery
Other XQuery methods
OPENXML
Table to XML
Dealing with JSON data
OPENJSON
Other JSON functions
Table to JSON
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
9. Variables and Control Flow Statements
Structure
Objective
Variables
Declaring the variables
Assigning values to the variables
Reading values from the variables
Tiny, yet powerful keywords
BEGIN … END
Semicolon (;)
RETURN
GOTO
WAITFOR
CASE statement
IF statement
WHILE loop
BREAK
CONTINUE
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
10. Temporary Tables, CTE, and MERGE Statement
Structure
Objective
Temporary tables
Common Table Expression (CTE)
MERGE command
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
11. Error Handling and Transaction Management
Structure
Objective
Error handling
TRY … CATCH
Retrieving error information
@@ERROR
Transaction management
@@TRANCOUNT
XACT_STATE()
Implementing explicit transaction
Conclusion
Points to remember
Multiple choice question
Answers
Questions
Key terms
12. Data Conversion, Cross-Database, and Cross-Server Data Access
Structure
Objective
Data conversion
CAST and CONVERT
PARSE
TRY_CAST, TRY_CONVERT, and TRY_PARSE
Cross-database data access
Cross-server data access
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
13. Programmability
Structure
Objective
Dealing with NULL values
ISNULL
COALESCE
NULLIF
Dealing with IDENTITY value
@@IDENTITY
IDENT_CURRENT (<table_name>)
SCOPE_IDENTITY ()
Dynamic SQL
SET NOCOUNT {ON | OFF}
IS and IS NOT
EXISTS and NOT EXISTS
EXISTS
NOT EXISTS
Programmability objects
Views
User-defined functions
Scalar user-defined functions
Table-valued user-defined functions
Stored procedures
Stored procedures with output parameters
Stored procedures with the default parameters
Getting hands dirty with stored procedures
Triggers
DDL triggers
DML triggers
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
14. Deployment
Structure
Objective
Deployment
Different methods of deployment
Generating and executing script
Generating Scripts
Backup and Restore
Conclusion
Points to remember
Multiple choice questions
Answers
Questions
Key terms
Index
The book hasn't received reviews yet.
You May Also Like
SQL Interview Questions
$19.95
Prasad Kulkarni
SQL Interview Questions
Learning Elasticsearch 7.x
$19.95
Anurag Srivastava
Learning Elasticsearch 7.x
Fundamentals of Software Engineering
$19.95
Hitesh Mohapatra, Amiya Kumar Rath
Fundamentals of Software Engineering
Data Science Fundamentals and Practical Approaches
$19.95
Dr Gypsy Anand/ Dr Rupam Sharma
Data Science Fundamentals and Practical Approaches
RDBMS In-Depth
$19.95
Dr. Madhavi Vaidya
RDBMS In-Depth