Product Overview
Simply SQL
Table Of Contents
- Here’s a look at the table of contents:
- 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
- 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, andDELETE- The
SELECTStatement
- Standard SQL
- Read The Fine Manual
- Wrapping Up: an Introduction to SQL
- SQL Statement Overview
- An Overview of the
SELECTStatement- The
SELECTStatement - The
SELECTandFROMClauses- Content Management System
- The
WHEREClause - The
GROUP BYandHAVINGClauses - The
ORDER BYClause - Wrapping Up: the
SELECTStatement
- The
- The
FROMClause- Why Start with the
FROMClause?- Parsing an SQL Statement
FROMOne TableFROMMore than One Table UsingJOINs- 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
FROMClause
- Why Start with the
- The
WHEREClause- Conditions
- Conditions that are True
- When “Not True” is Preferable
- Shopping Carts
- Conditions that Evaluate as UNKNOWN
- Operators
- Comparison Operators
- The
LIKEOperator - The
BETWEENOperator
- Compound Conditions with
ANDand OR- Truth Tables
- Combining
ANDand OR
INConditionsINwith Subqueries
- Correlated Subqueries
EXISTSConditionsNOT INorNOT EXISTS?
WHEREClause Performance- Indexes
- Wrapping Up: the
WHEREClause
- Conditions
- The
GROUP BYClause- Grouping is More than Sequencing
- Out of Many, One
- Drill-down SQL
GROUP BYin Context
- How
GROUP BYWorks- Group Rows
- Rules for GROUP BY
- Columns with Certain Large Data Types
- Wrapping Up: the GROUP BY
- The
HAVINGClauseHAVINGFilters Group RowsHAVINGwithout aGROUP BYClause
- Wrapping Up: the
HAVINGClause
- The
SELECTClauseSELECTin the Sequence of Execution- Which Columns Can Be Selected?
- Detail Rows
- Group Rows
- The Discussion Forum Application
- The
forumsTable - The
membersTable - The
threadsTable - The
postsTable
- The
- 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
- The
ORDER BYClauseORDER BYSyntax- How
ORDER BYWorks- ASC and DESC
ORDER BYClause Performance- The Sequence of Values
- The Scope of ORDER BY
- Using
ORDER BYwith GROUP BY ORDER BYExpressions- Special Sequencing
ORDER BYwithUNIONQueries
- Using
- Wrapping Up: the
ORDER BYClause
- 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
CHECKConstraints
- Wrapping Up: SQL Data Types
- 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
- Special Structures
- Joining to a Table Twice
- Joining a Table to Itself
- Implementing a Many-to-many Relationship: Keywords
- Wrapping Up: Special Structures
- 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
- Sample Applications
- Data Model Diagrams
- Teams and Games
- Content Management System
- Discussion Forums
- Shopping Carts
- Sample Scripts
- Teams and Games
- The
teamsTable - The
gamesTable
- The
- Content Management System
- The
entriesTable - The
categoriesTable - The
entries_with_categoryView - The
contentsTable - The
commentsTable - The
entrykeywordsTable
- The
- Discussion Forums
- The
forumsTable - The
membersTable - The
threadsTable - The
postsTable
- The
- Shopping Carts
- The
itemsTable - The
customersTable - The
cartsTable - The
cartitemsTable - The
vendorsTable
- The
- Teams and Games
- SQL Keywords
- Index



