Installing SQL Server Express Edition
Installing the Sample Databases
Using SQL Server Management Studio
Launching SQL Server Management Studio
Chapter 2: Writing Simple SELECT Queries
Mixing Literals and Column Names
Using WHERE Clauses with Alternate Operators
Restricting the Characters in Pattern Matches
Using WHERE Clauses with Two Predicates
Using WHERE Clauses with Three or More Predicates
Using Multiple Terms with CONTAINS
Chapter 3: Using Functions and Expressions
Concatenating Strings and NULL
Concatenating Other Data Types to Strings
Using Functions in the WHERE and ORDER BY Clauses
Using Functions in the WHERE Clause
Chapter 4: Querying Multiple Tables
Avoiding an Incorrect Join Condition
Joining on a Different Column Name
Joining on More Than One Column
Using OUTER JOIN to Find Rows with No Match
Adding a Table to the Right Side of a Left Join
Adding a Table to the Left Side of a Left Join
Using a Subquery in an IN List
Using a Subquery Containing NULL with NOT IN
Exploring Derived Tables and Common Table Expressions
Using Common Table Expressions
Using a CTE to Solve a Complicated Join Problem
Chapter 5: Grouping and Summarizing Data
DISTINCT Within an Aggregate Expression
Aggregate Queries with More Than One Table
Isolating Aggregate Query Logic
Using a Correlated Subquery in the WHERE Clause
Using Derived Tables and CTEs to Display Details
Adding One Row with Literal Values
Inserting Multiple Rows with One Statement
Inserting Rows from Another Table
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 from a Table Using a Join or a Subquery
Updating Data with Expressions and Columns
Updating with Aggregate Functions
Writing an Explicit Transaction
Chapter 7: Understanding T-SQL Programming Logic
Declaring and Initializing a Variable
Using Expressions and Functions with Variables
Using Variables in WHERE and HAVING Clauses
Using TRY…CATCH with Transactions
Using THROW Instead of RAISERROR
Temporary Tables and Table Variables
Using a Temp Table or Table Variable
Using a Temp Table or Table Variable as an Array
Converting XML into Data Using OPENXML
Retrieving Data as XML Using the FOR XML Clause
Chapter 9: Moving Logic to the Database
Adding Check Constraints to a Table
Adding a Primary Key to a Table
Creating Foreign Keys with Delete and Update Rules
Defining Automatically Populated Columns
Avoiding Common Problems with Views
Creating User-Defined Scalar Functions
Using Table-Valued User-Defined Functions
Using Default Values with Parameters
Saving the Results of a Stored Proc in a Table
Using a Logic in Stored Procedures
Chapter 10: Working with Data Types
Large-Value String Data Types (MAX)
Using DATE, TIME, and DATETIME2
Using Stored Procedures to Manage Hierarchical Data
Viewing the Spatial Results Tab
Chapter 11: Writing Advanced Queries
Using the Alternate CTE Syntax