Friday, August 28, 2009

"SQL for Smarties" Errata (part 1)

I need to learn more about SQL, and someone I respect recommended Joe Celko's book. I've been delving into it over the past few weeks. I'm learning a lot, but have hit a few typographical errors. Give the size of the book, it's not surprising. I would still (even given these errors) recommend this book for someone who has a good knowledge of SQL and wants to learn more. I would, however, caution them to run the SQL examples themselves to verify that the syntax is correct.

Here is the first set of errata. If any of these seem incorrect, don't hesitate to post a correction to my correction.

Code typos:

Page 73:
One of the "course_name" columns should be "course_code"
Page 461:
Condition "AND P2.salary_amt < P1.salary_amt" gives bottom n salaries, not top n.
Page 741:
I can't parse the example "color || = 'Purply Green')". I think it should be "color || '' = 'Purply Green')"
Page 746:
The two SELECT examples are inconsistent. One has a CAST operator and the other doesn't.

Non-code typos:

Page 33, bottom sentence:
"correction" -> "correct"