Errata

SQL in a Nutshell

Errata for SQL in a Nutshell

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
ePub Page na
SQL Statement Command Reference - Merge Statement Overview

Sorry, I can't provide a detailed page reference as I can't see the page number in my software.

The table lists Postgres as supporting the MERGE statement but later contradicts in the copy. As of 9.2 Postgres does not support the MERGE statement.

Charlie Clark  Jun 17, 2013 
Printed Page 4
Figure 1-1`

The table states that a Column can "contain one or many" DOMAIN and USER DEFINED TYPES. I have read elsewhere that every value in a column must be of the same type. Which is correct?

Anonymous  Aug 22, 2010 
Printed Page 9
next to last paragraph, right before ANSI and Theta style SELECT examples

Paragraph refers to "employee" base table and "jobs" base table, but SELECT examples are working with "authors" and "titleauthors" base tables.

Patrick Marcell  Mar 22, 2011 
Printed Page 64
Bottom of page, Oracle example of using a list of values instead of a subquery

I believe that in order to find all employees who have a job_lvl value equal to 9 -OR- 14, the example should be using the ANY or SOME operator, not the ALL operator, as it would not be possible for job_lvl to equal both 9 and 14 simultaneously. As I'm just learning SQL, perhaps I am wrong in my interpretation of the sample command?

Patrick Marcell  Mar 22, 2011 
Printed Page 203
in the example, beginning with 'CREATE TRIGGER'

In the example code, you have:

CREATE TRIGGER update_person_data
ON people
FOR update AS
IF (COLUMNS_UPDATED(people_name)
OR COLUMNS_UPDATEE(people_addr)
OR COLUMNS_UPDATED(city) )
BEGIN

but I believe it should be:

CREATE TRIGGER update_person_data
ON people
FOR update AS
IF (UPDATE(people_name)
OR UPDATE(people_addr)
OR UPDATE(city) )
BEGIN

Stephen Pilon  Oct 18, 2012 
309
3rd paragraph (join type) under FULL OUTER JOIN and UNION JOIN

This is how the section reads:


FULL [OUTER] JOIN
Specifies that all rows from both tables be returned, regardless of whether a row from one table matches a row in the other table. Any columns that have no value in the corresponding joined table are assigned a NULL value.

UNION JOIN
Specifies that all the columns of both tables and every row of both tableswill be returned .Any columns that have no value in the corresponding joined table are assigned a NULL value.


The definitions are identical, except for the wording. I believe in realit ANSI SQL defines UNION JOIN as a FULL OUTER JOIN with the matching rows removed.

Christoffer Swanstroem  Jan 11, 2012 
Printed Page 417
5th paragraph query body

Instead of query
"SELECT firstname, lastname,
(SELECT COUNT(*)
FROM employee, senior
WHERE employee.hiredate > senior.hiredate) as senioritype
FROM employee"
shoud be:
"SELECT firstname, lastname,
(SELECT COUNT(*)
FROM employee AS senior
WHERE employee.hiredate > senior.hiredate) as senioritype
FROM employee"


nazar  Apr 07, 2014 
Printed, PDF Page 422
MySQL section

The book states that the Union SQL syntax in MySQL is "Not Supported."

At least as far back as MySQL 5.0 there has been support for the Union syntax. See http://dev.mysql.com/doc/refman/5.0/en/union.html, e.g.

Anders Wallgren  Apr 01, 2011