Errata


Print Print Icon

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 "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



Version Location Description Submitted By Corrected
Printed Page xiv

Next to chapter 5 Heading in TOC, "ver" should be "Ever"

Anonymous  Nov 2007
Printed Page xxix
3rd paragraph

"But we assume that if you're holding this book, you really want to
learn about project management." "project management" should be "SQL"

Anonymous  Nov 2007
Printed Page xxxiv
3rd paragraph, line 5

Missing period after "tennis"

Anonymous  Jun 2009
Printed Page 15, 16
3rd sentence, top of page

"Come up some likely columns for each table" should be "come up with
some likely columns for each table."

Anonymous  Nov 2007
Printed Page 19
In the annotation pointing to the comma in the third line of bolded code at the bottom of

the page, "colums" should be "columns".

Anonymous  May 2008
Other Digital Version 19
In the annotation pointing to the comma in the third line of bolded code at the bottom of

the page, "colums" should be "columns".

Anonymous  May 2008
Printed Page 25
in handwritten text at top of rightmost column

The text reads "These two numbers show how many digits the database should expect in front the decimal, and how many after." This is incorrect. It should read: "These two numbers show how many digits the database should expect, and how many after the decimal."

Anonymous  Nov 2007
Printed Page 25
Table. First row, last column and legend

The description of the decimal type is wrong and the example number actually doesn't fit the datatype provided.

The number before the comma in the DECIMAL data type is defined as the number of significant digits of the value. To store 5678.39, you would actually need DEC(6,2). MySQL accepts the value none the less, but a standards-compliant database should complain.

Anonymous  Nov 2007
Printed Page 26
Table with solutions

tax_rate must be defined as dec(5,3) to hold values from 0.000 to 100.000 (99.999 being the significant number here) to correctly hold all the percentages in the format shown in the example.

The provided solution dec(4,2) would not be sufficient to even hold the number provided in the question on page 25 because 3.755 requires three digits after the decimal point to store.

Anonymous  Nov 2007
Printed Page 26
tax_rate row, Best Choice of Data Type column

In http://oreilly.com/catalog/9780596526849/errata/9780596526849.1113 you state this needs to be DEC(5,3) for tax rates of 0.000 to 100.000. Obviously if you were to tax at 100.000, you'd need DEC(6,3).

Note from the Author or Editor:
Change DEC(5,3) to read DEC(6,3) in the fourth column in the row labeled "tax_rate"

Anonymous  Jun 2009
Printed Page 30
SQL Magnets Solution

The CREATE DATABASE and USE DATABASE commands need to end in a semicolon

Anonymous  Nov 2007
Printed Page 31
Under there are no Dumb Questions, answer to 3rd Question

In the line "Since there is no data in the table yet, we can simply get rid of the old one away
and start over."

Delete the word "away," so it just reads "get rid of the old one and start over."

{62/63} 4th query/text beneath query: WHERE second = "orange juice";

Answer should be: Hot Gold

Changed the annotation to: "This query works and doesn't cause an error even though you used single quotes when you inserted the value."

Anonymous  May 2008
Other Digital Version 31
Under there are no Dumb Questions, answer to 3rd Question

In the line "Since there is no data in the table yet, we can simply get rid of the old one away
and start over."

Delete the word "away," so it just reads "get rid of the old one and start over."

{62/63} 4th query/text beneath query: WHERE second = "orange juice";

Answer should be: Hot Gold

Changed the annotation to: "This query works and doesn't cause an error even though you used single quotes when you inserted the value."

Anonymous  May 2008
Printed Page 42
annotation in the middle of the page

"We're using the the version..." should be "We're using the version..."

Anonymous  Nov 2007
Printed Page 48
arrow pointing at DEC(3,2)

This arrow should have a handwritten annotation that reads, "The total digits allowed are 3, with 1 before and 2 after the decimal."

Anonymous  Nov 2007
Printed Page 53
1st paragraph

"When it comes to databases, chances are you'll need to retrieve your
data as often than you'll need to insert it." should read "When it comes
to databases, chances are you'll need to retrieve your data as often as
you'll need to insert it."

Anonymous  Nov 2007
Printed Page 76
Solution on the lower portion of the page doesn't include possible answer: WHERE drink_name = 'Bull Frog'.

Added an annotation to the bottom part of the page: "You could also have used the obvious query SELECT drink_name FROM easy_drinks WHERE drink_name = 'Bull Frog';"

Anonymous  May 2008
Other Digital Version 76
Solution on the lower portion of the page doesn't include possible answer: WHERE drink_name = 'Bull Frog'.

Added an annotation to the bottom part of the page: "You could also have used the obvious query SELECT drink_name FROM easy_drinks WHERE drink_name = 'Bull Frog';"

Anonymous  May 2008
Printed Page 77
First bullet point: removed extra "when"


First bullet point - remove extra "when"

Anonymous  May 2008
Printed Page 82
Solution to third query

Solution to third query should be the following:
SELECT last_name, first_name, email
FROM my_contacts
WHERE location = 'San Antonio, TX'
AND gender = 'M'
AND status = 'single';

Anonymous  Nov 2007
Printed Page 86
first sentence

"So far we have only used the equal sign in our WHERE clause..." should be changed to "So far, we've mainly used the equal sign in our WHERE clause."

Anonymous  Nov 2007
Printed Page 87

In the bottom left corner, => should be <=

Anonymous  Nov 2007
Printed Page 89-90
bottom of the page -- last query

The text, "...without using the names of the drinks in your query." should be added to the end of the last question on the page.

Anonymous  Jun 2009
Printed Page 90
Bottom (last solution)

SELECT drink_name, color, ice FROM drink_info
WHERE
cost >=3.8;

Removed "=" from ">=" in solution. Now the solution query reads: SELECT drink_name, color, ice FROM drink_info WHERE cost > 3.8;

Anonymous  May 2008
Printed Page 90
Bottom (last solution)

Capitalization error
Changed "LIps" to "Lips"

Anonymous  May 2008
Other Digital Version 90
Bottom (last solution)

SELECT drink_name, color, ice FROM drink_info
WHERE
cost >=3.8;

Removed "=" from ">=" in solution. Now the solution query reads: SELECT drink_name, color, ice FROM drink_info WHERE cost > 3.8;

Anonymous  May 2008
Other Digital Version 90
Bottom (last solution)

Capitalization error
Changed "LIps" to "Lips"

Anonymous  May 2008
Printed Page 93
1st paragraph, 3rd sentence

"So, instead of two the two separate queries..." should be "So, instead of the two separate queries..."

Anonymous  Nov 2007
Printed Page 103-104
Second WHERE statement

Wildcard character '_' stands for just one unknown character. Two letters are missing from Elsie's name 'El'sie.

Changed the magnet on 103 and 104 to read:
WHERE cow_name LIKE '_lsie';

Anonymous  May 2008
Other Digital Version 103-104
Second WHERE statement

Wildcard character '_' stands for just one unknown character. Two letters are missing from Elsie's name 'El'sie.

Changed the magnet on 103 and 104 to read:
WHERE cow_name LIKE '_lsie';

Anonymous  May 2008
Printed Page 104

Sixth WHERE clause from the top should only have one semicolon at the
end. It should be:

WHERE state LIKE 'M%' or state LIKE 'A%';

Anonymous  Nov 2007
Printed Page 108
Middle example comment related to query

The comment says, "We'll get drink names that begin with G and O, and all the letters in between."

Solution should read: "... drink_name BETWEEN 'G' AND 'P'...";
Changed the annotation to: "This one is a bit tricky! We need to use the letter after O to make sure we get drink names that begin with O. Test it out and see for yourself."

Anonymous  May 2008
Other Digital Version 108
Middle example comment related to query

The comment says, "We'll get drink names that begin with G and O, and all the letters in between."

Solution should read: "... drink_name BETWEEN 'G' AND 'P'...";
Changed the annotation to: "This one is a bit tricky! We need to use the letter after O to make sure we get drink names that begin with O. Test it out and see for yourself."

Anonymous  May 2008
Printed Page 113,115
First solution incorrect

Changed the solution to:
SELECT drink_name FROM easy_drinks
WHERE main IN ('peach nectar', 'soda');

Anonymous  May 2008
Other Digital Version 113,115
First solution incorrect

Changed the solution to:
SELECT drink_name FROM easy_drinks
WHERE main IN ('peach nectar', 'soda');

Anonymous  May 2008
Printed Page 115
Bottom of page

The solution:
... WHERE date_name NOT BETWEEN 'A' AND 'B';
returns 8 hits including Boris.

The clause should be:

... WHERE date_name NOT BETWEEN 'A' and 'C';

Anonymous  Nov 2007
Printed Page 115
First solution (the answer) is incorrect

Changed to: WHERE main BETWEEN 'P' and 'T';

Also, the first solution annotation was changed to:
"You could also have used this WHERE clause: WHERE (BETWEEN 'P' and 'T');
This would have worked because we don't have any other main ingredients that satisfy the condition. But in general when you have a large table in the real world, you won't know what is in it, which is why you are querying in the first place.

Anonymous  May 2008
Other Digital Version 115
First solution (the answer) is incorrect

Changed to: WHERE main BETWEEN 'P' and 'T';

Also, the first solution annotation was changed to:
"You could also have used this WHERE clause: WHERE (BETWEEN 'P' and 'T');
This would have worked because we don't have any other main ingredients that satisfy the condition. But in general when you have a large table in the real world, you won't know what is in it, which is why you are querying in the first place.

Anonymous  May 2008
Printed Page 117

Single quote needed before the word "cherry" in fifth set of
parentheses, Kiss on the Lips drink.

Anonymous  Nov 2007
Printed Page 128
Answer to the last question.

Some of the best ones involving joins, a topic covered later in this book.

should read:

Some of the best ones involve joins, a topic covered later in this book.

Anonymous  Nov 2007
Printed Page 130
Bottom of the page (last paragraph, in bold)

Text currently reads:

"You can use WHERE clauses with DELETE statements the same way you can use them with INSERT statements."

In the statement above "INSERT" should be replaced with "SELECT".

Hence the corrected statement should be:

"You can use WHERE clauses with DELETE statements the same way you can use them with SELECT statements."

Anonymous  Nov 2007
Printed Page 133-134
Final question

The final question on page 133 and 134 should be:
WHERE location = 'Snappy Bagel' OR rating = 3;

Anonymous  Nov 2007
Printed Page 134
Answers to questions 4 and 6.

The arrows for Delete statement 4 point to the 1st, 3rd, and 4th row. They should point to the first, 2nd, and 4th row.

Delete statement 6 says "No Matches, did not DELETE." This is incorrect; the 2nd row would be deleted.

[NOTE: This correction to DELETE statement 6 is not needed if page 133 is corrected as listed above.]

Anonymous  Nov 2007
Printed Page 134
Answer to question 6

This is an error made in the November 2007 reprint, not the original printing.
The line was changed to: WHERE location = 'Snappy Bagel' OR rating = 3;
The answer should be "No matches, did not DELETE" and should have no arrows pointing to the
table below.

Anonymous  May 2008
Other Digital Version 134
Answer to question 6

This is an error made in the November 2007 reprint, not the original printing.
The line was changed to: WHERE location = 'Snappy Bagel' OR rating = 3;
The answer should be "No matches, did not DELETE" and should have no arrows pointing to the
table below.

Anonymous  May 2008
Printed Page 135
bottom of page

Bottom big code block should be changed to:
WHERE
activities = 'yelling, dancing'
AND name = 'Clarabelle';

Anonymous  Nov 2007
Printed Page 140
last_seen column

The last_seen column on this page should be changed to:
lastSeen
Cherry Hill Senior Center
Jack Green's party
Ball-mart
Oakland Hospital*
Belmont Senior Center
Oakland Hospital
Millstone Mall
Earl's Autos

Tracy's
Millstone Mall
Dickson Park*
Ball-mart*
Tracy's
Dickson Park*
Tracy's

*changed

This fixes problems with the exercise on page 141-142.

Anonymous  Nov 2007
Printed Page 144
SELECT statement

Your SELECT throws an error. You need a star or column name before the FROM.

In the first big code, the query should read:
SELECT * FROM clown_info
WHERE
activities = 'dancing';

Anonymous  Nov 2007
Printed Page 147
First Answer in "There are no dumb questions"

The text currently reads:

"Then every column in the SET clause in your table will be updated with the new value."

This is wrong. It should read:

"Every column specified in the SET clause for every row in your table will be updated with the new value."

Anonymous  Nov 2007
Printed Page 149
UPDATE in action

The text paragraph after the headline "UPDATE in action" does not correctly relate to the SQL statement right after that.

The text said:
"Using the UPDATE statement, the last_seen columnn of Mr. Hobo's record is changed from Dickson Park to Tracy's" while the text in the last_seen condition in the WHERE clause of the UPDATE statement mentioned "Party for Eric Gray"

Changed body text at top of page to read:
"...is changed from Party for Eric Gray to Tracy's..."

Anonymous  May 2008
Other Digital Version 149
UPDATE in action

The text paragraph after the headline "UPDATE in action" does not correctly relate to the SQL statement right after that.

The text said:
"Using the UPDATE statement, the last_seen columnn of Mr. Hobo's record is changed from Dickson Park to Tracy's" while the text in the last_seen condition in the WHERE clause of the UPDATE statement mentioned "Party for Eric Gray"

Changed body text at top of page to read:
"...is changed from Party for Eric Gray to Tracy's..."

Anonymous  May 2008
Printed Page 156
1st paragraph

The first sentence says "age column", but it should read "cost column".

Anonymous  Nov 2007
Printed Page 156
First SQL query

For this SQL query, the follow line should not end with a semicolon:

SET cost = cost + 1;

The semicolon causes the UPDATE query to update all rows.

Anonymous  Nov 2007
Printed Page 184
3rd paragraph

Paragraph uses 'SHOW CREATE_TABLE', with an underscore in CREATE_TABLE, but example afterward uses 'SHOW CREATE TABLE', with no underscore. (Neither works with my version of postgres, so I don't know which is correct.)

Note from the Author or Editor:
remove underscore from CREATE_TABLE in third paragraph

georgeberger  Jun 2009
Printed Page 189-190
Third query on middle of page

Although the third query on 189 and 190 may work with some versions of MySQL, it throws a warning and some versions won't fix it. It should be changed to:

INSERT INTO your_table
VALUES (2, 'Bobby', 'Brady');

Anonymous  Nov 2007
Printed Page 190
Middle of page

The third INSERT statement in Exercise 3 solution does not complete without error.

Annotated third insert statement:
This may or may not work for you. On some SQL versions it will give you an error, and on some just a warning such as
"Out of range value adjusted for column 'id' at row 1." If you get the error, Bobby's not in your table. With the warning, he will be.

Anonymous  May 2008
Other Digital Version 190
Middle of page

The third INSERT statement in Exercise 3 solution does not complete without error.

Annotated third insert statement:
This may or may not work for you. On some SQL versions it will give you an error, and on some just a warning such as
"Out of range value adjusted for column 'id' at row 1." If you get the error, Bobby's not in your table. With the warning, he will be.

Anonymous  May 2008
Printed Page 201-202
header of 201, magnets at bottom of 201, magnets on 202

In MySQL 5.0.51b on my Mac, ordinals beyond FIRST fail, as does BEFORE.

So,
ALTER TABLE my_contacts
ADD COLUMN phone VARCHAR(10) FOURTH;

fails altogether, as would
ALTER TABLE my_contacts
ADD COLUMN phone VARCHAR(10) BEFORE email;

Note from the Author or Editor:
Since this book isn't specifically about MySQL, this is excusable. It might be nice to add a warning annotations that:

BEFORE and orders after FIRST won't work with MySQL. Instead, you are stuck with FIRST and AFTER. (on page 201)

Anonymous  Jun 2009
Printed Page 210
middle

ADD PRIMARY KEY ('proj_id'); Should be without quotes, i.e.
ADD PRIMARY KEY (proj_id)

Anonymous  Nov 2007
Printed Page 212
Question in "There are no Dumb Questions" section

Question reads, "What if I want ot..." but should be "What if I want to..."

Anonymous  May 2008
Other Digital Version 212
Question in "There are no Dumb Questions" section

Question reads, "What if I want ot..." but should be "What if I want to..."

Anonymous  May 2008
Printed Page 212
First answer in There are no numb questions

This page says "You can't actually change the column order once the table already has been created." Then on page 219, there is code that changes the column order in a table that already has been created.

Note from the Author or Editor:
Change first NDQ to:

Q: What if I want to change the order of my columns? Can I just do: ALTER TABLE project_list MODIFY COLUMN proj_desc AFTER con_name;

A: You can't use MODIFY to change the order of columns. But there are some methods for changing column order we'll get to in just a minute. Keep in mind that column order really doesn't matter all that much.

Anonymous  Jun 2009
Printed Page 214
First line of SQL code in Exercise solution is incorrect.

ALTER TABLE project_table

should be:

ALTER TABLE project_list

Anonymous  May 2008
Other Digital Version 214
First line of SQL code in Exercise solution is incorrect.

ALTER TABLE project_table

should be:

ALTER TABLE project_list

Anonymous  May 2008
Printed Page 216
Sharpen your Pencil Solution - command

It reads yet:

ALTER TABLE project_table ...

should be

ALTER TABLE project_list ...

and the handwritten text above should read as

"Here's our table name"

Anonymous  May 2008
Other Digital Version 216
Sharpen your Pencil Solution - command

It reads yet:

ALTER TABLE project_table ...

should be

ALTER TABLE project_list ...

and the handwritten text above should read as

"Here's our table name"

Anonymous  May 2008
Printed Page 219
ALL OF IT

Code would not complete without error

Changed the answer to:

ALTER TABLE hooptie
RENAME TO car_table,
ADD COLUMN car_id INT NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (car_id),
ADD COLUMN VIN VARCHAR(16) AFTER car_id,
CHANGE COLUMN mo model VARCHAR(20),
MODIFY COLUMN color AFTER model,
MODIFY COLUMN year SIXTH,
CHANGE COLUMN howmuch price DECIMAL(7,2);

Deleted the bottom annotation on the page.

Anonymous  May 2008
Other Digital Version 219
ALL OF IT

Code would not complete without error

Changed the answer to:

ALTER TABLE hooptie
RENAME TO car_table,
ADD COLUMN car_id INT NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (car_id),
ADD COLUMN VIN VARCHAR(16) AFTER car_id,
CHANGE COLUMN mo model VARCHAR(20),
MODIFY COLUMN color AFTER model,
MODIFY COLUMN year SIXTH,
CHANGE COLUMN howmuch price DECIMAL(7,2);

Deleted the bottom annotation on the page.

Anonymous  May 2008
Printed Page 224
Top left corner title

Title of page is "string functionsr". an r is extra.

Note from the Author or Editor:
Fix left header on page. "string functionsr" should be "string functions"

Anonymous  Jun 2009
Printed Page 226
Bottom

Point no. 4 says "Put the data we grabbed in step 2...... ". We haven't grabbed any data in step 2.

Note from the Author or Editor:
Change 4 to read
4. Put the data we grabbed in step 3 into one of the empty columns.

Anonymous  Jun 2009
Printed Page 230
Middle of page left side first paragraph

The line reads "Let's see it in action on this example table. First time through, it takes the
location for the first column and operates on it." This should read "first row," not "column."

(245/246) Sharpen your pencil;
Instructions do not specify to add the G rating as part of the check as the answer implies on pg. 246.

Added sentence to end of instructions on 245 and 246: "If a cartoon has a G rating, put it in the family category."

Anonymous  May 2008
Other Digital Version 230
Middle of page left side first paragraph

The line reads "Let's see it in action on this example table. First time through, it takes the
location for the first column and operates on it." This should read "first row," not "column."

(245/246) Sharpen your pencil;
Instructions do not specify to add the G rating as part of the check as the answer implies on pg. 246.

Added sentence to end of instructions on 245 and 246: "If a cartoon has a G rating, put it in the family category."

Anonymous  May 2008
Printed Page 248
Whole page

In all cases, "movietable" should be changed to "movie_table"

Anonymous  May 2008
Other Digital Version 248
Whole page

In all cases, "movietable" should be changed to "movie_table"

Anonymous  May 2008
Printed Page 258
Description of "Purchased dates", next-to-last line contains typo.

"alwasy" was changed to "always"

Anonymous  May 2008
Other Digital Version 258
Description of "Purchased dates", next-to-last line contains typo.

"alwasy" was changed to "always"

Anonymous  May 2008
Printed Page 275
In the paragraph beginning with the text "Remember our top 100 songs?", the second line was changed from

"To see songs 20 through 30..." to "Suppose we wanted to see songs 20 through 29..."

Anonymous  May 2008
Other Digital Version 275
In the paragraph beginning with the text "Remember our top 100 songs?", the second line was changed from

"To see songs 20 through 30..." to "Suppose we wanted to see songs 20 through 29..."

Anonymous  May 2008
Printed Page 277
In the crossword puzzle, the clue for 10 down should be: "Use this in a SELECT to return the total value of results rather rather than the results themselves."


In the crossword puzzle, the clue for 10 down should be: "Use this in a SELECT to return the total value of results rather rather than the results themselves."

Anonymous  Nov 2007
Printed Page 279
Last line

The last line on the answer page on 279 does not match the last line on page 272. It should read, "How am I? Somewhere in the middle."

Anonymous  Nov 2007
Printed Page 307
SQL command in middle of page

At the end of the CREATE TABLE command, the final closing parenthesis should come before the semicolon.

Anonymous  Nov 2007
Printed Page 324
Shorthand notations

Removed semicolons after the arrows. For instance, T.x -> ; T.y should be: T.x -> T.y

Anonymous  May 2008
Other Digital Version 324
Shorthand notations

Removed semicolons after the arrows. For instance, T.x -> ; T.y should be: T.x -> T.y

Anonymous  May 2008
Printed Page 333
Final line of text

Final line of text in the instructions should read: "Finally, add these new columns to the appropriate tables: phone, manager, cost, and weight."

Anonymous  Nov 2007
Printed Page 333, 335
Sharpen Your Pencil Instructions

Add another sentence to the end of the third paragraph of the Sharpen Your Pencil instructions that says, "You may have to create new toy_ids."

Anonymous  Jun 2009
Printed Page 335
store_inventory table solution

The values in the first column, toy_id, in the store_inventory table need to be changed to:

toy_id
1
2
3
4
5
6
7
8
9
10

Anonymous  Nov 2007
Printed Page 339
Thought Cloud

"...writing a hundreds of queries" should be "...writing hundreds of queries"

Anonymous  May 2008
Other Digital Version 339
Thought Cloud

"...writing a hundreds of queries" should be "...writing hundreds of queries"

Anonymous  May 2008
Printed Page 340
Note on "Foreign key"

The note on "Foreign key" is wrong. The note printed describes third normal form instead of foreign key. The note should read, "A column in a table that references the primary key of another table."

Anonymous  Nov 2007
Printed Page 349
2nd paragraph

The second statement of the second paragraph on p. 349 is technically incorrect or explains incorrectly the usage of the SUBSTR function.

To remedy the mistake, we removed "We're telling it to return the same part we just put in interest1, plus two more characters (for the comma and space)."

Anonymous  May 2008
Other Digital Version 349
2nd paragraph

The second statement of the second paragraph on p. 349 is technically incorrect or explains incorrectly the usage of the SUBSTR function.

To remedy the mistake, we removed "We're telling it to return the same part we just put in interest1, plus two more characters (for the comma and space)."

Anonymous  May 2008
Printed Page 350
In 'sharpen your pencil', in the hint text

It says 'Rhe' instead of 'The'

Anonymous  May 2008
Other Digital Version 350
In 'sharpen your pencil', in the hint text

It says 'Rhe' instead of 'The'

Anonymous  May 2008
Printed Page 355
Middle; Code returns error

The 4th line of the big code query was changed from "profession varchar(20)" to mc_prof varchar(20)

Anonymous  May 2008
Other Digital Version 355
Middle; Code returns error

The 4th line of the big code query was changed from "profession varchar(20)" to mc_prof varchar(20)

Anonymous  May 2008
Printed Page 356
SELECT proffession AS mcprof

Should be mc_prof NOT mcprof

Anonymous  Nov 2007
Printed Page 359
there are no dumb questions

"?" missing at the end of question "so I'd used his......."

Note from the Author or Editor:
Not sure it's worth adding a ? to question, since it will confuse the syntax of the code. Best to leave as is.

Anonymous 
Printed Page 360, 362
Last line of query

Last line of query should be changed from "ON mc.contact_id = p.prof_id;" to "ON mc.prof_id = p.prof_id;"

Anonymous  Nov 2007
Printed Page 365
second block/question

It says "Query that returns...... and status each person ......". "of is missing. Should be "Query that returns...... and status OF each person ......".

Note from the Author or Editor:
second question should read "....and status of each person ..."

Anonymous  Jun 2009
Other Digital Version 370
The first and third queries on this page should use a NATURAL JOIN. The INNER JOIN will produce the wrong results.

Changed "INNER" to "NATURAL" in first and third answers.

Anonymous  May 2008
Printed Page 370
The first and third queries on this page should use a NATURAL JOIN. The INNER JOIN will produce the wrong results.

Changed "INNER" to "NATURAL" in first and third answers.

Anonymous  Jun 2009
Other Digital Version 378
Sharpen your pencil - Solution

The annotation for the table states, "The interests column is empty after we run the command." This is incorrect. The interests column still has the value "fourth" in it.

The annotation on the bottom of the page was changed to read "The interests column contains only the last interest at this point." Additionally, in the interests column on the table, the scratchy line was edited to only cross out the second and third part, leaving the fourth part unscratched.

Anonymous  May 2008
Printed Page 378
Sharpen your pencil - Solution

The annotation for the table states, "The interests column is empty after we run the command." This is incorrect. The interests column still has the value "fourth" in it.

The annotation on the bottom of the page was changed to read "The interests column contains only the last interest at this point." Additionally, in the interests column on the table, the scratchy line was edited to only cross out the second and third part, leaving the fourth part unscratched.

Anonymous  Jun 2009
Other Digital Version 381
Old tables in the ER diagram;

contact_interest.interest_id should link up with interests.interest_id
and
contact_seeking.seeking_id should link to seeking_id

To correct this, I edited the arrow paths:
The right arrow that points at contact_interest.contact_id was shifted down to contact_interest.interest_id.
The right arrow that points at contact_seeking.contact_id was shifted down to contact_seeking.seeking_id.

Anonymous  May 2008
Printed Page 381
Old tables in the ER diagram;

contact_interest.interest_id should link up with interests.interest_id
and
contact_seeking.seeking_id should link to seeking_id

To correct this, I edited the arrow paths:
The right arrow that points at contact_interest.contact_id was shifted down to contact_interest.interest_id.
The right arrow that points at contact_seeking.contact_id was shifted down to contact_seeking.seeking_id.

Anonymous  Jun 2009
Printed Page 384
Comment to the right of the page

The comment on this page says: "These are just a few of the titles in Greg's job_current table.". But the Select statement selects from the job_listings.

Note from the Author or Editor:
Change the text in the annotation on the right top half of the page from "job_current" table to say "job_listings"

Anonymous  Jun 2009
Printed Page 391-392
SQL's Rules of Order puzzle and solution

The words 'FROM' and 'HAVING' are used in the solution, but are not among the list of words for the puzzle.

Anonymous  Nov 2007
Printed Page 392

Second question refers to page 388, this should be page 387.

Anonymous  Nov 2007
Printed Page 398
Query

Query says "SELECT jc.salary ..... WHERE email = ''". It should be "SELECT jc.salary ..... WHERE mc.email = '........'". "mc." is missing.

Note from the Author or Editor:
Change third line of query to read

WHERE mc.email = 'andy@weatherorama.com';

Anonymous  Jun 2009
Printed Page 399
annotations for top query diagram

Two of the annotations for the top query diagram should be changed to indicate that the subquery (inner query) is processed first. The top-left annotation should be changed from "The RDBMS processes this part first." to "The RDBMS processes this part second." And the bottom-right annotation should be changed from "This is processed second." to "This is processed first."

Anonymous  Nov 2007
Printed Page 409
right hand side column of the "what's my purpose" column

In the sentence "If two contact_id are true, a condition is met.", "true" should be "equal" or "identical"?

Note from the Author or Editor:
Change the second entry in the right column of What's My Purpose from:

If two contact_id are true, a condition is met.

to:

If two contact_id match, a condition is met.

Anonymous  Jun 2009
Printed Page 428
First sentence in thought bubble

"...use an outer join to to join a single..." should be
"...use an outer join to join a single..."

Anonymous  Nov 2007
Printed Page 458
Under "He gets the status_id from the status table"

The second annotation on this page should be changed from "And here's the status_id that corresponds to 'married'." to "And here's the status_id that corresponds to 'single'."

Also, the value in the result table for status_id should be 3, not 4.

Anonymous  Nov 2007
Printed Page 461
Sharpen your pencil section

Column names while creating tables are column3 & column4. When adding CHECK constraint, column names are written as column_3 & column_4. TYPO. :)

Note from the Author or Editor:
Remove underscores from column names in queries. (column_3 should be column3 and column_4 should be column4. I see three instances of this.

Anonymous  Jun 2009
Printed Page 465
tech_writer_jobs CREATE VIEW statement

There should be a ',' character after 'title' in the tech_writer_jobs CREATE VIEW statement.

Anonymous  Nov 2007
Other Digital Version 472
SQL for creating view

The AS keyword is in the wrong place. AS in the statement was moved after pb_quarters, to read:

CREATE VIEW pb_quarters AS
SELECT...

Anonymous  May 2008
Printed Page 472
SQL for creating view

The AS keyword is in the wrong place. AS in the statement was moved after pb_quarters, to read:

CREATE VIEW pb_quarters AS
SELECT...

Anonymous  Jun 2009
Printed Page 490, 557
'UPDATABLE VIEWS' tooltip

"...all NOT NULL rows of the base table..." should be
"...all NOT NULL columns of the base table..."

Anonymous  Nov 2007
Printed Page 506
Leftmost bottom: Arrow going from root to sleepy.

Written "trys". Typo. Should be "tries".

Anonymous  Jun 2009
Printed Page 508
Solution to last problem

Solution says "REVOKE GRANT INSERT(location).....". Should be "REVOKE INSERT(location)......". GRANT is extra. Wrong syntax, i am a little bit confused.

Note from the Author or Editor:
get rid of the word "GRANT" in solution to last exercise.

Anonymous  Jun 2009
Printed Page 518
GRANT statements at the bottom of the page

"GRANT SELECT ON my_contacts * TO frank;" should be
"GRANT SELECT ON my_contacts.* TO frank;"

"GRANT SELECT, INSERT ON gregs_list * TO jim;" should be
"GRANT SELECT, INSERT ON gregs_list.* TO jim;"

Anonymous  Nov 2007
Printed Page 520
First paragraph

"...Greg's List to include to include local..." should be
"...Greg's List to include local..."

Anonymous  Nov 2007
Printed Page 528
second table

Used the '+' sign for subtraction and division. Should be '-' and '/', respectively.

Anonymous  Nov 2007
Printed Page 528
comparison operators table at the bottom of the page

'Not less than' operator should be '!<'
'Less than or equal to' operator should be '<='

Anonymous  Nov 2007
Printed Page 528
middle of page

the arrows from the annotation "these are only wildcards..." should point to the rows for _ and %.

Note from the Author or Editor:
As stated, the annotation arrows need to be redrawn:

the arrows from the annotation "these are only wildcards..." should point to the rows for _ and %.

Anonymous  Jun 2009
Printed Page 530
Last paragraph

The last body text paragraph should read: "The query above will return Pizza House. We can also use >= and <= with ALL. The query below will give us both The Shack and Arthur's. We get the ratings greater than any in our set, as well as equal to the largest one in our set, which is 7:"

Anonymous  Nov 2007
Printed Page 535
Last sentence

The last sentence of the page is nearly identical to the last sentence of the preceding section ('Some situations where you might want to use CAST()').

Anonymous  Nov 2007
Printed Page 537
"what does it do?" for the Log(x) and Log(x,y) functions

The "what does it do?" text for the Log(x) and Log(x,y) functions should be changed to "Returns the natural logarithm of x, or with two parameters returns the log of y for base x."

Anonymous  Nov 2007
Printed Page 541
Second to last highlighted code line at the bottom of the page

" lose($conn);" should be
"mysql_close($conn);"

Anonymous  Nov 2007


"The entire tone of the book is unconventional, informal, surprising, and even fun. All SQL elements are presented creatively, with inviting page layouts...This nonthreatening approach is not only refreshing and different, but more likely to result in a higher degree of learning and retention."
--Michael Kleper, The Kleper Report on Digital Publishing