Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
SQL in a Nutshell
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Preface
Why This Book?
Who Should Read This Book?
How This Book Is Organized
How to Use This Book
Resources
Changes in the Third Edition
Conventions Used in This Book
Using Code Examples
How to Contact Us
Safari® Books Online
Acknowledgments
Kevin E. Kline's Acknowledgments
Daniel Kline's Acknowledgments
Brand Hunt's Acknowledgments
1. SQL History and Implementations
The Relational Model and ANSI SQL
Codd's Rules for Relational Database Systems
Data structures (rules 1, 2, and 8)
NULLs (rule 3)
Metadata (rules 4 and 10)
The language (rules 5 and 11)
Views (rule 6)
Set operations (rules 7 and 12)
Codd's Rules in Action: Simple SELECT Examples
History of the SQL Standard
What's New in SQL2006
What's New in SQL2003 (SQL3)
Levels of Conformance
Supplemental Features Packages in the SQL3 Standard
SQL3 Statement Classes
SQL Dialects
2. Foundational Concepts
Database Platforms Described in This Book
Categories of Syntax
Identifiers
Naming conventions
Identifier rules
Literals
Operators
Arithmetic operators
Assignment operators
Bitwise operators
Comparison operators
Logical operators
Unary operators
Operator precedence
System delimiters and operators
Keywords and Reserved Words
SQL2003 and Platform-Specific Datatypes
MySQL Datatypes
Oracle Datatypes
PostgreSQL Datatypes
SQL Server Datatypes
Constraints
Scope
Syntax
PRIMARY KEY Constraints
FOREIGN KEY Constraints
UNIQUE Constraints
CHECK Constraints
3. SQL Statement Command Reference
How to Use This Chapter
SQL Platform Support
SQL Command Reference
ALL/ANY/SOME Operators
BETWEEN Operator
CALL Statement
CLOSE CURSOR Statement
COMMIT Statement
CONNECT Statement
CREATE/ALTER DATABASE Statement
CREATE/ALTER FUNCTION/PROCEDURE Statements
CREATE/ALTER INDEX Statement
CREATE/ALTER METHOD Statement
CREATE ROLE Statement
CREATE SCHEMA Statement
CREATE/ALTER TABLE Statement
CREATE/ALTER TRIGGER Statement
CREATE/ALTER TYPE Statement
CREATE/ALTER VIEW Statement
DECLARE CURSOR Command
DELETE Statement
DISCONNECT Statement
DROP Statements
EXCEPT Set Operator
EXISTS Operator
FETCH Statement
GRANT Statement
IN Operator
INSERT Statement
INTERSECT Set Operator
IS Operator
JOIN Subclause
LIKE Operator
MERGE Statement
OPEN Statement
ORDER BY Clause
RELEASE SAVEPOINT Statement
RETURN Statement
REVOKE Statement
ROLLBACK Statement
SAVEPOINT Statement
SELECT Statement
SET Statement
SET CONNECTION Statement
SET CONSTRAINT Statement
SET PATH Statement
SET ROLE Statement
SET SCHEMA Statement
SET SESSION AUTHORIZATION Statement
SET TIME ZONE Statement
SET TRANSACTION Statement
START TRANSACTION Statement
SUBQUERY Substatement
TRUNCATE TABLE Statement
UNION Set Operator
UPDATE Statement
WHERE Clause
4. SQL Functions
Types of Functions
Deterministic and Nondeterministic Functions
Aggregate and Scalar Functions
Window Functions
ANSI SQL Aggregate Functions
AVG and SUM
CORR
COUNT
COVAR_POP
COVAR_SAMP
CUME_DIST
DENSE_RANK
MIN and MAX
PERCENT_RANK
PERCENTILE_CONT
PERCENTILE_DISC
RANK
The REGR Family of Functions
STDDEV_POP
STDDEV_SAMP
VAR_POP
VAR_SAMP
ANSI SQL Window Functions
ANSI SQL2003's Window Syntax
Oracle's Window Syntax
SQL Server's Window Syntax
Partitioning
Ordering
Grouping or Windowing
List of Window Functions
CUME_DIST
DENSE_RANK
PERCENT_RANK
RANK
ROW_NUMBER
ANSI SQL Scalar Functions
Built-in Scalar Functions
CASE and CAST Functions
CASE
CAST
Numeric Scalar Functions
ABS
BIT_LENGTH, CHAR_LENGTH, and OCTET_LENGTH
CEIL
EXP
EXTRACT
FLOOR
LN
MOD
POSITION
POWER
SQRT
WIDTH_BUCKET
String Functions and Operators
Concatenation Operator
CONVERT and TRANSLATE
LOWER and UPPER
OVERLAY
SUBSTRING
TRIM
Platform-Specific Extensions
MySQL-Supported Functions
Oracle-Supported Functions
PostgreSQL-Supported Functions
SQL Server-Supported Functions
A. Shared and Platform-Specific Keywords
Index
About the Author
Colophon
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Copyright
← Prev
Back
Next →
← Prev
Back
Next →