Errata

SQL in a Nutshell

Errata for SQL in a Nutshell, Second Edition

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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 43
DECIMAL entry

the DECIMAL entry should be changed to read:

DECIMAL [(p,s)], NUMERIC[(p,s)](SQL2003 Datatype: DECIMAL (PRECISION,
SCALE), NUMERIC (p,s))
Stores exact decimal values with a precision (p) as high as 9 and a
scale (s) of 0, with no upper limit. Synonymous with NUMERIC.

Anonymous   
Printed
Page 44
NUMERIC entry

the NUMERIC entry should be changed to read:
NUMERIC [ (p, s) ], DECIMAL [ (p, s) ] (SQL2003 Datatype: none)
Stores exact numeric values with a precision (p) of 9 and a scale (s) of
0. Synonymous with DECIMAL.

Anonymous   
Printed
Page 59
table 3-1

The ALTER DATABASE statement should be listed as Not Supported in our table. Only Oracle and SQL Server should show "SWV" for
ALTER TABLE, while DB2, MySQL, and PostgreSQL should show "NS" for not
supported.

Anonymous   
Printed
Page 63
Rules at a Glance, example

"you can also find all the title_ids that were not published during 2002:"
Need to replace "2002" with "2003".

Anonymous   
Printed
Page 256
first code snippit on the page

WHERE customerid = 'TORTU

should be

WHERE customerid = 'TORTU'

(forgot the end quote)

Note from the Author or Editor:
Please correct by adding the apostrophe at the end of TORTU

Anonymous   
Printed
Page 282
Tip near bottom of page

TIP says:
EXISTS is symantically equivalent to the ANY operator.
it should read:
EXISTS is semantically equivalent to the ANY operator.

Anonymous   
Printed
Page 334-336

The last name is aliased imcorrectly in some of the examples on these pages:

Incorrect:
> Select a.au_lname as 'first name',
> a.au_fname as 'last name'

Corrected:
> Select a.au_lname as 'last name',
> a.au_fname as 'first name'

Anonymous   
Printed
Page 398
3rd line of the first paragraph

It says subqueries are not supported prior to version 4.0. In fact, they were
introduced in version 4.1, so are not supported in version 4.0.

Anonymous   
Printed
Page 405
ORG CHART QUERY RESULTS

The last two Org Chart names listed SHOULD be indented two additional
spaces each, as Employee ID 102 reports to Employee ID 101, and Employee
ID 103 reports to Employee ID 102.

Note from the Author or Editor:
The last two Org Chart names listed SHOULD be indented two additional
spaces each, as Employee ID 102 reports to Employee ID 101, and Employee
ID 103 reports to Employee ID 102.

Anonymous   
Printed
Page 455
under UNION Set Operator

in the table, MySQL says "Not supported" but it should say "Supported, with limitations"
like the others.

Anonymous   
Printed
Page 457
MySQL

It says "Not supported", but it is in version 4

Anonymous   
Printed
Page 464
the UPDATE statement was left out.

UPDATE
UPDATE [LOW_PRIORITY] [IGNORE] [ table | table_reference]
SET column=expression[, ...] [WHERE condition]
[ORDER BY {column|expression|position}[ASC|DESC] , ...]
[LIMIT {[offset,] count|count OFFSET offset}]
This statements changes items in table or in tables modified by a JOIN clause in table_reference.
Columns are set to values specified by the SET clause, and the rows changed can be limited by
WHERE clause. The ORDER BY and LIMIT clauses work as in statements shown earlier in this chapter.

Anonymous   
Printed
Page 521
SUBSTRING - MySQL

The MySQL syntax is:
{SUBSTR | SUBSTRING}(extraction_string FROM starting_position [FOR length])
{SUBSTR | SUBSTRING}(extraction_string, starting_position [, length])




Note from the Author or Editor:
Please alter the existing syntax in the 2nd edition to the correct syntax - The MySQL syntax is:
{SUBSTR | SUBSTRING}(extraction_string FROM starting_position [FOR length])
{SUBSTR | SUBSTRING}(extraction_string, starting_position [, length])

Anonymous   
Printed
Page 536
Before CONCAT_WS

There is no entry for the CONCAT function.

Anonymous