Introduction |
|
1 | (4) |
1 Database Basics |
|
5 | (8) |
|
|
5 | (1) |
|
|
5 | (1) |
|
What Is a Database Diagram? |
|
|
6 | (1) |
|
|
7 | (1) |
|
What Is a Stored Procedure? |
|
|
8 | (1) |
|
What Is a User-Defined Function? |
|
|
9 | (1) |
|
|
10 | (3) |
2 SQL Server Basics |
|
13 | (20) |
|
Versions of SQL Server 2014 Available |
|
|
13 | (3) |
|
|
16 | (3) |
|
Introduction to Microsoft SQL Server Management Studio |
|
|
19 | (6) |
|
Connecting to a Database Server |
|
|
25 | (2) |
|
Installing the Sample Files |
|
|
27 | (6) |
3 Creating a SQL Server Database |
|
33 | (12) |
|
|
33 | (3) |
|
Defining Database Options |
|
|
36 | (3) |
|
|
39 | (1) |
|
Attaching to an Existing Database |
|
|
40 | (5) |
4 Working with SQL Server Tables |
|
45 | (22) |
|
Creating SQL Server Tables |
|
|
45 | (1) |
|
Adding Fields to the Tables You Create |
|
|
46 | (4) |
|
|
50 | (6) |
|
Creating an Identity Specification |
|
|
56 | (1) |
|
|
57 | (1) |
|
Working with User-Defined Data Types |
|
|
58 | (2) |
|
Adding and Modifying Indexes |
|
|
60 | (4) |
|
|
64 | (3) |
5 Working with Table Relationships |
|
67 | (22) |
|
An Introduction to Relationships |
|
|
67 | (3) |
|
Creating and Working with Database Diagrams |
|
|
70 | (7) |
|
Working with Table Relationships |
|
|
77 | (2) |
|
Designating Table and Column Specifications |
|
|
79 | (2) |
|
Adding a Relationship Name and Description |
|
|
81 | (1) |
|
Determining When Foreign Key Relationships Constrain the Data Entered in a Column |
|
|
81 | (3) |
|
Designating Insert and Update Specifications |
|
|
84 | (5) |
6 Getting to Know the SELECT Statement |
|
89 | (16) |
|
|
89 | (1) |
|
Working with the SELECT Statement |
|
|
90 | (2) |
|
Adding on the FROM Clause |
|
|
92 | (1) |
|
Including the WHERE Clause |
|
|
93 | (8) |
|
Using the ORDER BY Clause |
|
|
101 | (4) |
7 Taking the SELECT Statement to the Next Level |
|
105 | (16) |
|
Adding the DISTINCT Keyword |
|
|
105 | (2) |
|
Working with the FOR xmL Clause |
|
|
107 | (2) |
|
Working with the GROUP BY Clause |
|
|
109 | (1) |
|
Including Aggregate Functions in Your SQL Statements |
|
|
110 | (7) |
|
Taking Advantage of the HAVING Clause |
|
|
117 | (1) |
|
Creating Top Values Queries |
|
|
118 | (3) |
8 Building SQL Statements Based on Multiple Tables |
|
121 | (8) |
|
|
121 | (8) |
9 Powerful Join Techniques |
|
129 | (12) |
|
|
129 | (1) |
|
Taking Advantage of Self-Joins |
|
|
130 | (3) |
|
Exploring the Power of Union Queries |
|
|
133 | (3) |
|
|
136 | (1) |
|
Using the INTERSECT Operator |
|
|
137 | (1) |
|
Working with the EXCEPT Operator |
|
|
138 | (3) |
10 Modifying Data with Action Queries |
|
141 | (8) |
|
|
141 | (2) |
|
|
143 | (2) |
|
The SELECT INTO Statement |
|
|
145 | (1) |
|
|
146 | (1) |
|
|
147 | (2) |
11 Getting to Know the T-SQL Functions |
|
149 | (28) |
|
Working with Numeric Functions |
|
|
149 | (2) |
|
Taking Advantage of String Functions |
|
|
151 | (12) |
|
Exploring the Date/Time Functions |
|
|
163 | (7) |
|
|
170 | (7) |
12 Working with SQL Server Views |
|
177 | (14) |
|
|
177 | (8) |
|
Using T-SQL to Create or Modify a View |
|
|
185 | (6) |
13 Using T-SQL to Design SQL Server Stored Procedures |
|
191 | (24) |
|
The Basics of Working with Stored Procedures |
|
|
192 | (6) |
|
Declaring and Working with Variables |
|
|
198 | (2) |
|
|
200 | (15) |
14 Stored Procedure Techniques Every Developer Should Know |
|
215 | (18) |
|
The SET NOCOUNT Statement |
|
|
215 | (1) |
|
|
216 | (5) |
|
|
221 | (6) |
|
Errors and Error Handling |
|
|
227 | (6) |
15 Power Stored Procedure Techniques |
|
233 | (10) |
|
Modifying Data with Stored Procedures |
|
|
233 | (4) |
|
Stored Procedures and Transactions |
|
|
237 | (6) |
16 Stored Procedure Special Topics |
|
243 | (10) |
|
Stored Procedures and Temporary Tables |
|
|
243 | (2) |
|
Stored Procedures and Cursors |
|
|
245 | (5) |
|
Stored Procedures and Security |
|
|
250 | (3) |
17 Building and Working with User-Defined Functions |
|
253 | (10) |
|
|
253 | (10) |
18 Creating and Working with Triggers |
|
263 | (14) |
|
|
263 | (3) |
|
Creating an Insert Trigger |
|
|
266 | (3) |
|
Creating an Update Trigger |
|
|
269 | (3) |
|
Creating a Delete Trigger |
|
|
272 | (2) |
|
|
274 | (3) |
19 Authentication |
|
277 | (22) |
|
|
277 | (1) |
|
|
278 | (2) |
|
|
280 | (5) |
|
|
285 | (14) |
20 SQL Server Permissions Validation |
|
299 | (22) |
|
|
299 | (10) |
|
Getting to Know Table Permissions |
|
|
309 | (3) |
|
Getting to Know View Permissions |
|
|
312 | (2) |
|
Getting to Know Stored Procedure Permissions |
|
|
314 | (1) |
|
Getting to Know Function Permissions |
|
|
315 | (1) |
|
Implementing Column-Level Security |
|
|
315 | (6) |
21 Configuring, Maintaining, and Tuning SQL Server |
|
321 | (14) |
|
Selecting and Tuning Hardware |
|
|
321 | (3) |
|
Configuring and Tuning SQL Server |
|
|
324 | (11) |
22 Maintaining the Databases You Build |
|
335 | (20) |
|
Backing Up Your Databases |
|
|
335 | (3) |
|
|
338 | (3) |
|
The Database Engine Tuning Advisor |
|
|
341 | (3) |
|
Creating and Working with Database Maintenance Plans |
|
|
344 | (11) |
23 Performance Monitoring |
|
355 | (22) |
|
Executing Queries in SQL Server Management Studio |
|
|
355 | (3) |
|
Displaying and Analyzing the Estimated Execution Plan |
|
|
358 | (4) |
|
Adding Indexes to Allow Queries to Execute More Efficiently |
|
|
362 | (2) |
|
|
364 | (3) |
|
|
367 | (10) |
24 Installing and Upgrading SQL Server |
|
377 | (12) |
|
Installing SQL Server 2014 Enterprise Edition |
|
|
377 | (8) |
|
Installing SQL Server Management Studio |
|
|
385 | (4) |
Index |
|
389 | |