Introduction

This book is an attempt to cram the most useful information about SQL into a pocket-size guide. It covers data manipulation and transaction control statements, datatypes, and table creation and modification for the following platforms:

Oracle Database 10g Release 2
(including Oracle Express Edition)
IBM DB2 Universal Database Release 8.2
Microsoft SQL Server 2005
MySQL 5.0
PostgreSQL 8.1

Not all syntax will work on all platforms, and some features may not be available in earlier releases of these products. Whenever possible, I’ve tried to note any product or release dependencies.

Note

This book cannot possibly cover all SQL syntax for all products. Its goal is to cover the syntax most commonly used by developers. If you need comprehensive and authoritative syntax, refer to the SQL reference manual for your database platform.

Organization of This Book

After this introduction, topics are organized alphabetically, with section names carefully chosen to correspond to relevant SQL keywords. If you need help writing a join, for example, you should be able to quickly flip through the book and find the section titled "Joining Tables" between the sections "Inserting Data" and "Literals.” Consult the table of contents and/or the index if you don’t immediately find what you’re looking for.

Feedback Needed!

Many thanks to all of the readers of the first edition who took the time to provide feedback and suggestions. As the result of an overwhelming number of requests, I’ve added coverage of ...

Get SQL Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.