Product Overview

Simply SQL

Table Of Contents

- Here’s a look at the table of contents:

  1. Preface
    • Who Should Read This Book?
    • The Challenges to Learning SQL
    • What’s in This Book?
    • How to Gain Help
      • The SitePoint Forums
      • The Book’s Web Site
    • The SitePoint Newsletters
    • Your Feedback
    • Conventions Used in This Book
      • Code Samples
      • Tips, Notes, and Warnings
    • Acknowledgments
  2. An Introduction to SQL
    • SQL Statement Overview
      • Keywords, Identifiers, and Constants
      • Clauses
      • Syntax
    • Data Definition Language
      • CREATE, ALTER, and DROP
      • Starting Over
    • Data Manipulation Language
      • INSERT, UPDATE, and DELETE
      • The SELECT Statement
    • Standard SQL
      • Read The Fine Manual
    • Wrapping Up: an Introduction to SQL
  3. An Overview of the SELECT Statement
    • The SELECT Statement
    • The SELECT and FROM Clauses
      • Content Management System
    • The WHERE Clause
    • The GROUP BY and HAVING Clauses
    • The ORDER BY Clause
    • Wrapping Up: the SELECT Statement
  4. The FROM Clause
    • Why Start with the FROM Clause?
      • Parsing an SQL Statement
    • FROM One Table
    • FROM More than One Table Using JOINs
      • Types of Join
      • The Inner Join
      • Outer Joins
      • The Cross Join
    • Real World Joins
      • Inner Join: Categories and Entries
      • Left Outer Join: Categories and Entries
      • Right Outer Join: Categories and Entries
      • Full Outer Join: Categories and Entries
    • Views
      • Views in Web Development
    • Subqueries and Derived Tables
    • Wrapping Up: the FROM Clause
  5. The WHERE Clause
    • Conditions
      • Conditions that are True
      • When “Not True” is Preferable
    • Shopping Carts
      • Conditions that Evaluate as UNKNOWN
    • Operators
      • Comparison Operators
      • The LIKE Operator
      • The BETWEEN Operator
    • Compound Conditions with AND and OR
      • Truth Tables
      • Combining AND and OR
    • IN Conditions
      • IN with Subqueries
    • Correlated Subqueries
    • EXISTS Conditions
      • NOT IN or NOT EXISTS?
    • WHERE Clause Performance
      • Indexes
    • Wrapping Up: the WHERE Clause
  6. The GROUP BY Clause
    • Grouping is More than Sequencing
    • Out of Many, One
      • Drill-down SQL
      • GROUP BY in Context
    • How GROUP BY Works
      • Group Rows
    • Rules for GROUP BY
      • Columns with Certain Large Data Types
    • Wrapping Up: the GROUP BY
  7. The HAVING Clause
    • HAVING Filters Group Rows
      • HAVING without a GROUP BY Clause
    • Wrapping Up: the HAVING Clause
  8. The SELECT Clause
    • SELECT in the Sequence of Execution
    • Which Columns Can Be Selected?
      • Detail Rows
      • Group Rows
    • The Discussion Forum Application
      • The forums Table
      • The members Table
      • The threads Table
      • The posts Table
    • Functions
      • Aggregate Functions
      • Scalar Functions
    • Operators
      • Numeric Operators
      • The Concatenation Operator
      • Temporal Operators
    • The Dreaded, Evil Select Star
    • SELECT DISTINCT
    • Wrapping Up: the SELECT Clause
  9. The ORDER BY Clause
    • ORDER BY Syntax
    • How ORDER BY Works
      • ASC and DESC
      • ORDER BY Clause Performance
      • The Sequence of Values
    • The Scope of ORDER BY
      • Using ORDER BY with GROUP BY
      • ORDER BY Expressions
      • Special Sequencing
      • ORDER BY with UNION Queries
    • Wrapping Up: the ORDER BY Clause
  10. SQL Data Types
    • An Overview of Data Types
    • Numeric Data Types
      • Integers
      • Decimals
      • Floating-point Numbers
      • Conversions in Numeric Calculations
      • Numeric Functions
    • Character Data Types
      • CHAR
      • VARCHAR
      • Numeric or Character?
      • NCHAR and NVARCHAR
      • CLOB and BLOB
      • String Functions
    • Temporal Data Types
      • DATE
      • TIME
      • TIMESTAMP
      • Intervals
      • Date Functions
    • Column Constraints
      • NULL or NOT NULL
      • DEFAULT
      • CHECK Constraints
    • Wrapping Up: SQL Data Types
  11. Relational Integrity
    • Identity
    • Data Modelling
      • Entities and Attributes
      • Entities and Relationships
    • Primary Keys
    • UNIQUE Constraints
    • Foreign Keys
      • How Foreign Keys Work
      • Using Foreign Keys
    • Natural versus Surrogate Keys
      • Autonumbers
    • Wrapping Up: Relational Integrity
  12. Special Structures
    • Joining to a Table Twice
    • Joining a Table to Itself
    • Implementing a Many-to-many Relationship: Keywords
    • Wrapping Up: Special Structures
  1. Testing Environment
    • Download Your Database System Software
    • Bookmark or Download the SQL Reference
    • Connect to the Database System
      • Command Line
      • Front-end Applications
    • SQL Script Library
    • Performance Problems and Obtaining Help
      • Obtaining the Execution Plan
      • Seeking Help
      • Indexing
  2. Sample Applications
    • Data Model Diagrams
    • Teams and Games
    • Content Management System
    • Discussion Forums
    • Shopping Carts
  3. Sample Scripts
    • Teams and Games
      • The teams Table
      • The games Table
    • Content Management System
      • The entries Table
      • The categories Table
      • The entries_with_category View
      • The contents Table
      • The comments Table
      • The entrykeywords Table
    • Discussion Forums
      • The forums Table
      • The members Table
      • The threads Table
      • The posts Table
    • Shopping Carts
      • The items Table
      • The customers Table
      • The carts Table
      • The cartitems Table
      • The vendors Table
  4. SQL Keywords
  5. Index


Instant Download!
This title available in Adobe PDF format only

SitePoint Books

  • advocate best practice techniques
  • lead you through practical examples
  • provide working code for your web site
  • make learning easy and fun

100% Money Back Guarantee