HOME
SEARCH
BLOG
SCRIPTS
CONTACT
SEARCH
SEARCH
Disclaimer:
Authors have full rights over their works. Reproduction of any part of the content is prohibited without prior authorization.
×
BOOK THE LANGUAGE OF SQL, 2ND EDITION
DOWNLOAD
SUMMARY
Items Found:
165
1 Relational Databases and SQL 1
What Is SQL? 2
Microsoft SQL Server, MySQL, and Oracle 3
Relational Databases 4
Primary and Foreign Keys 6
Datatypes 6
NULL Values 8
The Significance of SQL 8
Looking Ahead 9
2 Basic Data Retrieval 11
A Simple SELECT 11
Syntax Notes 12
Comments 13
Specifying Columns 14
Column Names with Embedded Spaces 15
Preview of the Full SELECT 16
Looking Ahead 17
3 Calculated Fields and Aliases 19
Literal Values 20
Arithmetic Calculations 21
Concatenating Fields 22
Column Aliases 23
Table Aliases 24
Looking Ahead 25
4 Using Functions 27
What Is a Function? 27
Character Functions 28
Composite Functions 32
Date/Time Functions 33
Numeric Functions 35
Conversion Functions 36
Looking Ahead 39
5 Sorting Data 41
Sorting in Ascending Order 41
Sorting in Descending Order 43
Sorting by Multiple Columns 43
Sorting by a Calculated Field 44
Sort Sequences 45
Looking Ahead 47
6 Selection Criteria 49
Applying Selection Criteria 49
WHERE Clause Operators 50
Limiting Rows 51
Limiting Rows with a Sort 53
Pattern Matching 54
Wildcards 56
Looking Ahead 58
7 Boolean Logic 61
Complex Logical Conditions 61
The AND Operator 62
The OR Operator 62
Using Parentheses 63
Multiple Sets of Parentheses 65
The NOT Operator 66
The BETWEEN Operator 68
The IN Operator 69
Boolean Logic and NULL Values 70
Looking Ahead 72
8 Conditional Logic 73
The CASE Expression 73
The Simple CASE Format 74
The Searched CASE Format 76
Conditional Logic in ORDER BY Clauses 78
Conditional Logic in WHERE Clauses 79
Looking Ahead 80
9 Summarizing Data 81
Eliminating Duplicates 81
Aggregate Functions 83
The COUNT Function 84
Grouping Data 86
Multiple Columns and Sorting 87
Selection Criteria on Aggregates 89
Conditional Logic in GROUP BY Clauses 91
Conditional Logic in HAVING Clauses 92
Ranking Functions 93
Partitions 97
Looking Ahead 100
10 Subtotals and Crosstabs 101
Adding Subtotals with ROLLUP 102
Adding Subtotals with CUBE 106
Creating Crosstab Layouts 110
Looking Ahead 114
11 Inner Joins 115
Joining Two Tables 116
The Inner Join 118
Table Order in Inner Joins 119
An Alternate Specification of Inner Joins 119
Table Aliases Revisited 120
Looking Ahead 121
12 Outer Joins 123
The Outer Join 123
Left Joins 125
Testing for NULL Values 127
Right Joins 128
Table Order in Outer Joins 129
Full Joins 129
Cross Joins 131
Looking Ahead 134
13 Self Joins and Views 135
Self Joins 135
Creating Views 137
Referencing Views 139
Benefits of Views 140
Modifying and Deleting Views 141
Looking Ahead 142
14 Subqueries 143
Types of Subqueries 143
Using a Subquery as a Data Source 144
Using a Subquery in Selection Criteria 147
Correlated Subqueries 148
The EXISTS Operator 150
Using a Subquery as a Calculated Column 151
Common Table Expressions 152
Looking Ahead 153
15 Set Logic 155
Using the UNION Operator 156
Distinct and Non-Distinct Unions 158
Intersecting Queries 159
Looking Ahead 161
16 Stored Procedures and Parameters 163
Creating Stored Procedures 164
Parameters in Stored Procedures 165
Executing Stored Procedures 167
Modifying and Deleting Stored Procedures 167
Functions Revisited 168
Looking Ahead 169
17 Modifying Data 171
Modification Strategies 171
Inserting Data 172
Deleting Data 175
Updating Data 176
Correlated Subquery Updates 177
Looking Ahead 179
18 Maintaining Tables 181
Data Definition Language 181
Table Attributes 182
Table Columns 183
Primary Keys and Indexes 183
Foreign Keys 184
Creating Tables 185
Creating Indexes 187
Looking Ahead 187
19 Principles of Database Design 189
Goals of Normalization 190
How to Normalize Data 191
The Art of Database Design 195
Alternatives to Normalization 196
Looking Ahead 197
20 Strategies for Displaying Data 199
Crosstab Layouts Revisited 199
Excel and External Data 200
Excel Pivot Tables 203
Looking Ahead 207
A Getting Started with Microsoft SQL Server 209
Installing SQL Server 2016 Express 209
Installing SQL Server 2016 Management Studio Express 210
Using SQL Server 2016 Management Studio Express 210
B Getting Started with MySQL 211
Installing MySQL on Windows 211
Installing MySQL on a Mac 212
Using MySQL Workbench 213
C Getting Started with Oracle 215
Installing Oracle Database Express Edition 215
Using Oracle Database Express Edition 216
Index 217