Table of Contents
Introduction 1
Part I: Getting Started with SQL 3
Chapter 1: Relational Database Fundamentals 5
Chapter 2: SQL Fundamentals 21
Chapter 3: The Components of SQL 51
Part II: Using SQL to Build Databases 79
Chapter 4: Building and Maintaining a Simple Database Structure 81
Chapter 5: Building a Multitable Relational Database 105
Part III: Storing and Retrieving Data 137
Chapter 6: Manipulating Database Data 139
Chapter 7: Handling Temporal Data 157
Chapter 8: Specifying Values 171
Chapter 9: Using Advanced SQL Value Expressions 197
Chapter 10: Zeroing In on the Data You Want 211
Chapter 11: Using Relational Operators 243
Chapter 12: Delving Deep with Nested Queries 267
Chapter 13: Recursive Queries 285
Part IV: Controlling Operations 295
Chapter 14: Providing Database Security 297
Chapter 15: Protecting Data 313
Chapter 16: Using SQL within Applications 333
Part V: Taking SQL to the Real World 347
Chapter 17: Accessing Data with ODBC and JDBC 349
Chapter 18: Operating on XML Data with SQL 359
Part VI: Advanced Topics 381
Chapter 19: Stepping through a Dataset with Cursors 383
Chapter 20: Adding Procedural Capabilities with Persistent Stored Modules 393
Chapter 21: Handling Errors 411
Chapter 22: Triggers 423
Part VII: The Part of Tens 429
Chapter 23: Ten Common Mistakes 431
Chapter 24: Ten Retrieval Tips 435
Appendix: SQL: 2011 Reserved Words 439
Index 443