Search and Find
Service
Front Cover
1
SQL Clearly Explained
4
Copyright Page
5
Contents
6
Preface to the Second Edition
14
The Organization of This Book
15
The CD and the Sample Database
16
Acknowledgments
16
Part 1: Getting Started
18
Chapter 1: Installing and Running MySQL
20
Linux
21
Windows
23
Mac OS X
24
Chapter 2: Creating and Loading Databases
26
Creating a New Database
27
Creating the Tables
31
Populating the Tables
32
Chapter 3: Introduction to SQL
34
A Bit of SQL History
35
Conformance Levels
37
Relational Database Terminology and the Sample Database
38
Manipulating Relations
43
SQL Environments
44
Part 2: Performing Interactive Data Manipulation
50
Chapter 4: Simple SQL Retrieval
52
Choosing Columns
53
Ordering the Result Table
58
Choosing Rows
59
Nulls and Retrieval: Three-Valued Logic
79
Chapter 5: Retrieving Data from More Than One Table: Joins
82
The Relational Algebra Join Operation
83
SQL Syntax for Inner Joins
88
Finding Multiple Rows in One Table: Joining a Table to Itself
98
Outer Joins
102
Valid versus Invalid Joins
107
Avoiding Joins with Uncorrelated Subqueries
111
Chapter 6: Advanced Retrieval Operations
118
Union
118
Negative Queries
125
The EXISTS Operator
132
CASE Expressions
134
Chapter 7: Calculations and Grouping Queries
136
Performing Arithmetic
137
String Manipulations
140
Date and Time Manipulation
144
Set Functions
147
Changing Data Types: Using CAST
153
Grouping Queries
156
Chapter 8: Data Modification
164
Inserting Rows
165
Updating Data
168
Deleting Rows
169
Part 3: Managing Database Structure
172
Chapter 9: Schemas and Tables
174
Database Object Hierarchy
175
Schemas
177
Domains
180
Tables
181
Chapter 10: Views, Temporary Tables, and Indexes
196
Views
196
Temporary Tables
201
Indexes
204
Modifying Database Elements
207
Deleting Database Elements
212
Granting and Revoking Access Rights
213
Part 4: Program-Based Data Manipulation
218
Chapter 11: Users, Sessions, and Transaction Control
220
The Concurrent Use Data Environment
221
Database User IDs
225
Database Sessions and Connections
227
Transaction Control
229
Chapter 12: Embedded SQL
234
The Embedded SQL Environment
234
DBMS Return Codes
237
Retrieving a Single Row
238
Retrieving Multiple Rows: Cursors
241
Embedded SQL Data Modification
248
Chapter 13: Dynamic SQL
252
Immediate Execution
253
Dynamic SQL with Dynamic Parameters
255
Part 5: Additional Language Features
266
Chapter 14: Unimplemented SQL-92 Features
268
Additional Relational Algebra Operations
268
Additional Predicate Operators
273
Table Constructors in Queries
276
Additional Foreign Key Options
277
Assertions
278
Determining When Constraints Are Checked
278
Chapter 15: Object-Oriented Features of the SQL:1999 Standard
282
The Basics of Object Orientation
283
SQL:1999 versus Pure Object-Orientation
303
Object-Relational Support
305
Typed Tables
306
Creating Classes
307
Querying with Classes
312
Modifying Data for Classes as Domains
314
Part 6: Appendices
316
Appendix A: The Online Bookstore Database
318
Appendix B: SQLSTATE Return Codes
326
Appendix C: SQL Syntax Summary
332
Appendix D: SQL:1999 Core Features
340
Glossary
350
Index
360
All prices incl. VAT