did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780596005122

SQL Pocket Guide

by
  • ISBN13:

    9780596005122

  • ISBN10:

    0596005121

  • Format: Paperback
  • Copyright: 2004-03-01
  • Publisher: Oreilly & Associates Inc

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $9.95 Save up to $2.49
  • Buy Used
    $7.46

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

This unique reference can be a major help to programmers who use SQL in their day-to-day work. Not just an endless collection of syntax diagrams, this small guide addresses the language's complexity head on and leads by example. The book covers the three most commonly used database products: Oracle, IBM's DB2, and Microsoft's SQL Server. It's a concise reference to frequently used SQL statements and commonly used SQL functions.

Author Biography

Jonathan Gennick is an O'Reilly & Associates editor specializing in database and programming titles. Prior to joining O'Reilly, Jonathan amassed some 17 years of programming and database management experience. During the latter part of his career he specialized in relational database programming, and more recently in database management. Jonathan got his start with relational database systems in 1990, first working with Ingres, and later with Digital's Rdb software. During that period he developed a fondness for SQL, and for the challenge of applying SQL creatively in ways that leveraged it's set-oriented capabilities. In 1994 Jonathan made the leap to Oracle, and is now often found writing about it. Recent projects include Oracle SQLLoader (O'Reilly & Associates, 2001); Oracle SQLPlus Pocket Reference (O'Reilly & Associates, 2000); Oracle SQL*Plus: The Definitive Guide (O'Reilly & Associates, 1999); More recently, Jonathan has made forays into other database products, coauthoring Transact-SQL Cookbook (O'Reilly & Associates, 2002) and editing Practical PostgreSQL (O'Reilly & Associates, 2002). Jonathan is certified as an Oracle DBA and is a member of MENSA and the Oracle Technology Network. He holds a Bachelor of Arts degree in Information and Computer Science, with a Business Administration minor, from Andrews University in Berrien Springs, Michigan. Jonathan currently resides in Munising, Michigan with his wife Donna and their two children: Jenny and Jeff. Jonathan may be contacted by email at jonathan@gennick.com, and you can learn more about him personally by visiting his website at http://gennick.com.

Table of Contents

Introductionp. 1
Organization of This Bookp. 2
Feedback Needed!p. 2
Conventionsp. 3
Acknowledgmentsp. 4
Example Datap. 4
CASE Expressionsp. 7
Simple CASE Expressionsp. 7
Searched CASE Expressionsp. 8
Datatype Conversionp. 9
ANSI/ISO CAST Functionp. 9
ANSI/ISO EXTRACT Functionp. 10
Datetime Conversions (Oracle)p. 11
Numeric Conversions (Oracle)p. 15
Miscellaneous Conversions (Oracle)p. 18
Datetime Conversions (DB2)p. 18
Numeric Conversions (DB2)p. 21
Miscellaneous Conversions (DB2)p. 23
Datetime Conversions (SQL Server)p. 23
Numeric Conversions (SQL Server)p. 27
Miscellaneous Conversions (SQL Server)p. 29
Datetime Conversions (MySQL)p. 29
Numeric Conversions (MySQL)p. 34
Deleting Datap. 35
Deleting All Rowsp. 36
Deleting from Views and Subqueriesp. 37
Deleting from Partitions (Oracle)p. 37
Returning the Deleted Data (Oracle)p. 38
Double-FROM (SQL Server)p. 39
Flashback Queries (Oracle)p. 40
Functionsp. 41
Date Functionsp. 42
Numeric and Math Functionsp. 48
Trigonometric Functionsp. 50
String Functionsp. 50
Miscellaneous Functions (Oracle)p. 56
Grouping and Summarizingp. 56
Aggregate Functionsp. 56
GROUP BYp. 57
Useful GROUP BY Techniquesp. 59
HAVINGp. 60
GROUP BY Extensions (Oracle)p. 61
GROUP BY Extensions (SQL Server)p. 64
Hierarchical Queriesp. 66
ANSI/ISO Recursive WITH (DB2)p. 66
CONNECT BY Syntax (Oracle)p. 67
Inserting Datap. 72
Single-Row Insertsp. 72
Insert Targetsp. 73
Subquery Insertsp. 73
Direct-Path Inserts (Oracle)p. 74
RETURNing Inserted Values (Oracle)p. 74
Multi-Table Inserts (Oracle)p. 75
Joining Tablesp. 77
The Concept of a Joinp. 77
Cross Joinsp. 79
Inner Joinsp. 79
Non-Equi-Joinsp. 83
Outer Joinsp. 83
Literalsp. 87
Text Literalsp. 88
Numeric Literalsp. 89
Datetime Literalsp. 90
Datetime Interval Literalsp. 90
Merging Datap. 91
NULLsp. 92
Predicates for NULLsp. 92
Using CASE with NULLsp. 93
Functions for NULLs (Oracle)p. 94
Functions for NULLs (DB2)p. 95
Functions for NULLs (SQL Server)p. 95
Functions for NULLs (MySQL)p. 95
Predicatesp. 96
Group Comparison Predicatesp. 97
Multiple Values on the Left (Oracle)p. 98
EXISTS Predicatesp. 99
IN Predicatesp. 99
BETWEEN Predicatesp. 100
LIKE Predicatesp. 100
Recursive Queriesp. 101
Regular Expressionsp. 102
Regular Expressions (Oracle)p. 102
Regular Expressions (SQL Server)p. 104
Regular Expressions (MySQL)p. 105
Selecting Datap. 106
The SELECT Clausep. 107
ALL and DISTINCTp. 114
The FROM Clausep. 116
The WHERE Clausep. 119
The GROUP BY Clausep. 119
The HAVING Clausep. 119
The ORDER BY Clausep. 120
Subqueriesp. 121
The WITH Clausep. 122
WITH with Correlated Subqueriesp. 123
Transaction Managementp. 125
Autocommit Modep. 125
Starting a Transactionp. 126
Ending a Transactionp. 129
Aborting a Transactionp. 130
Aborting to a Transaction Savepointp. 131
Union Queriesp. 132
UNION and UNION ALLp. 132
Order of Evaluationp. 134
EXCEPT (or MINUS)p. 134
INTERSECTp. 136
Updating Datap. 137
Simple Updatesp. 137
New Values from a Subqueryp. 138
Updating Through a Cursorp. 139
Updating Views and Subqueriesp. 139
Updating a Partition (Oracle)p. 140
Returning the Updated Data (Oracle)p. 140
UPDATE FROM Clause (SQL Server)p. 140
Indexp. 143
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program