SQL Pocket Guide, 3rd Edition
- Length: 208 pages
- Edition: 3
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2010-12-01
- ISBN-10: 1449394094
- ISBN-13: 9781449394097
- Sales Rank: #124140 (See Top 100 Books)
If you’re a programmer or database administrator who uses SQL in your day-to-day work, this popular pocket guide is the ideal on-the-job reference. You’ll find many examples that address the language’s complexity, along with key aspects of SQL used in IBM DB2 Release 9.7, MySQL 5.1, Oracle Database 11g Release 2, PostgreSQL 9.0, and Microsoft SQL Server 2008 Release 2.
SQL Pocket Guide describes how these database systems implement SQL syntax for querying, managing transactions, and making changes to data. It also shows how the systems use SQL functions, regular expression syntax, and type conversion functions and formats.
All example SQL statements in this book execute against a set of tables, with data that you can quickly download. The third edition covers important database changes, including:
- Oracle’s support of the recursive WITH syntax, and addition of PIVOT and UNPIVOT operators
- Functions new to Oracle, such as LISTAGG, NTH_VALUE, and more
- PostgreSQL’s support of recursive WITH and some window functions
- DB2 syntax and datatypes, some compatible with Oracle
- MySQL features such as the TIMESTAMP type and the TO_SECONDS function
Table of Contents
Introduction
Analytic Functions
CASE Expressions: Simple
CASE Expressions: Searched
CAST Function
CONNECT BY Queries
Data Type Conversion
Data Types: Binary Integer
Data Types: Character String
Data Types: Datetime
Data Types: Decimal
Datetime Conversions: DB2
Datetime Conversions: MySQL
Datetime Conversions: Oracle
Datetime Conversions: PostgreSQL
Datetime Conversions: SQL Server
Datetime Functions: DB2
Datetime Functions: MySQL
Datetime Functions: Oracle
Datetime Functions: PostgreSQL
Datetime Functions: SQL Server
Deleting Data
EXTRACT Function
GREATEST
Grouping and Summarizing
Hierarchical Queries
Indexes, Creating
Indexes, Removing
Inserting Data
Joining Tables
LEAST
Literals
Merging Data
Nulls
Numeric Conversions: DB2
Numeric Conversions: MySQL
Numeric Conversions: Oracle
Numeric Conversions: PostgreSQL
Numeric Conversions: SQL Server
Numeric/Math Functions
OLAP Functions
Pivoting and Unpivoting
Predicates
Recursive Queries
Regular Expressions
Selecting Data
String Functions
Subqueries
Tables, Creating
Tables, Dropping
Tables, Modifying
Transaction Management
Union Queries
Updating Data
Window Functions