Preface; Why Learn SQL?; Why Use This Book to Do It?; Structure of This Book; Conventions Used in This Book; How to Contact Us; Using Code Examples; Safari® Books Onliâ Acknowledgments;Chapter 1: A Little Background; 1.1 Introduction to Databases; 1.2 What Is SQL?; 1.3 What Is MySQL?; 1.4 What's in Store;Chapter 2: Creating and Populating a Database; 2.1 Creating a MySQL Database; 2.2 Using the mysql Command-Line Tool; 2.3 MySQL Data Types; 2.
4 Table Creation; 2.5 Populating and Modifying Tables; 2.6 When Good Statements Go Bad; 2.7 The Bank Schema;Chapter 3: Query Primer; 3.1 Query Mechanics; 3.2 Query Clauses; 3.3 The select Clause; 3.4 The from Clause; 3.
5 The where Clause; 3.6 The group by and having Clauses; 3.7 The order by Clause; 3.8 Test Your Knowledâ¥Chapter 4: Filtering; 4.1 Condition Evaluation; 4.2 Building a Condition; 4.3 Condition Types; 4.4 Null: That Four-Letter Word; 4.
5 Test Your Knowledâ¥Chapter 5: Querying Multiple Tables; 5.1 What Is a Join?; 5.2 Joining Three or More Tables; 5.3 Self-Joins; 5.4 Equi-Joins Versus Non-Equi-Joins; 5.5 Join Conditions Versus Filter Conditions; 5.6 Test Your Knowledâ¥Chapter 6: Working with Sets; 6.1 Set Theory Primer; 6.
2 Set Theory in Practice; 6.3 Set Operators; 6.4 Set Operation Rules; 6.5 Test Your Knowledâ¥Chapter 7: Data Generation, Conversion, and Manipulation; 7.1 Working with String Data; 7.2 Working with Numeric Data; 7.3 Working with Temporal Data; 7.4 Conversion Functions; 7.
5 Test Your Knowledâ¥Chapter 8: Grouping and Aggregates; 8.1 Grouping Concepts; 8.2 Aggregate Functions; 8.3 Generating Groups; 8.4 Group Filter Conditions; 8.5 Test Your Knowledâ¥Chapter 9: Subqueries; 9.1 What Is a Subquery?; 9.2 Subquery Types; 9.
3 Noncorrelated Subqueries; 9.4 Correlated Subqueries; 9.5 When to Use Subqueries; 9.6 Subquery Wrap-up; 9.7 Test Your Knowledâ¥Chapter 10: Joins Revisited; 10.1 Outer Joins; 10.2 Cross Joins; 10.3 Natural Joins; 10.
4 Test Your Knowledâ¥Chapter 11: Conditional Logic; 11.1 What Is Conditional Logic?; 11.2 The Case Expression; 11.3 Case Expression Examples; 11.4 Test Your Knowledâ¥Chapter 12: Transactions; 12.1 Multiuser Databases; 12.2 What Is a Transaction?; 12.3 Test Your Knowledâ¥Chapter 13: Indexes and Constraints; 13.
1 Indexes; 13.2 Constraints; 13.3 Test Your Knowledâ¥Chapter 14: Views; 14.1 What Are Views?; 14.2 Why Use Views?; 14.3 Updatable Views; 14.4 Test Your Knowledâ¥Chapter 15: Metadata; 15.1 Data About Data; 15.
2 Information_Schema; 15.3 Working with Metadata; 15.4 Test Your Knowledâ¥ER Diagram for Example Database;MySQL Extensions to the SQL Langua⥠Extensions to the select Statement; Combination Insert/Update Statements; Ordered Updates and Deletes; Multitable Updates and Deletes;Solutions to Exercises; Chapter 3; Chapter 4; Chapter 5; Chapter 6; Chapter 7; Chapter 8; Chapter 9; Chapter 10; Chapter 11; Chapter 12; Chapter 13; Chapter 14; Chapter 15;Colophon;.