Errata

SQL Pocket Guide

Errata for SQL Pocket Guide

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
Printed Page Updating data
N/A

How come the MERGE Statement was left out of this edition? It is an extremely powerful utility for insert/updating/deleting data.

Dennis Schall  May 26, 2023 
Printed Page 63
second query

currently is:

... LEFT JOIN waterfalls w ...

should be:

... LEFT JOIN waterfall w ...


Marcin Krzysztof Jaworski  Nov 08, 2023 
ePub Page 68-107
Chapter 4

First of all, I want to say that I found the book very well written and easy to follow.

I especially like the order in which the topic is presented. As an example, Chapter 4 presents queries and then Chapter 5 treats database creation and population. Although this is not the order in which data is created and used, this order is much better didactically. In fact, if you first understand queries you can better understand the creation of a database.

Chapter 4 uses a database (on tours in Michigan’s Upper Peninsula) with four tables (waterfall, owner, country, tour) as an example. It’s clear from the text that the database tables are small, which is a very good idea for an example. Unfortunately, however, the exact structure of the tables and their contents (maybe one or two pages in a pocket book) are not given in the text.


Issues:

1. Not knowing exactly what the database contains, it is difficult to understand the examples properly.

2. Understanding cannot be verified by duplicating (with variations) the examples.

Is it possible to download the small database?

Thank you in advance.

Vittorio G. Caffa  Dec 05, 2022 
Printed Page 171-172
bottom half 171 and top of 172

create table my_table(
dt_text TEXT,
dt_real REAL,
dt_integer INTEGER
);
insert into my_table values(
'2021-12-25',
'2021-12-25',
'2021-12-25'
);

table6-18 says:
datatype real stores as Julian day number
datatype integer stores as Unix time

while in REALITY both datatypes (real and integer) in SQLITE store as string in format yyyy-mm-dd . no difference to datatype text as your output also shows on bottom of page 171

Anonymous  May 27, 2022 
Printed Page 273
Bottom right column entry

The "WHERE s.name = p.name;" clause is wrong. This converts it to a normal JOIN. If the bottom middle column is desired, the SQL code is just "SELECT * FROM states s, pets p;"

David W. Wormuth  Aug 08, 2023 
PDF Page 314
3rd row in a table

There is an example of update query for PostgreSQL, SQLite

UPDATE deals
SET name = p.name
FROM deals d
INNER JOIN products p
ON d.id = p.id
WHERE deals.id = p.id;

The second reference to the table deals is completely unnecessary. The following will work in the same way:

UPDATE deals
SET name = p.name
FROM products p
WHERE deals.id = p.id;

Tatiana Vaskovskaya  Jan 03, 2023