Skip to content

Commit

Permalink
fixing merge conflicts:
Browse files Browse the repository at this point in the history
  • Loading branch information
mckays630 committed Mar 26, 2015
2 parents 46abec2 + 554089b commit 0ef5114
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 03-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For example,
we can ask for all information from the DR-1 site collected before 1930:

~~~ {.sql}
SELECT * FROM Visited WHERE (site="DR-1") AND (dated<"1930-00-00");
SELECT * FROM Visited WHERE (site="DR-1") AND (dated<="1930-01-01");
~~~

|ident|site|dated |
Expand Down
10 changes: 5 additions & 5 deletions 05-null.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Null doesn't behave like other values.
If we select the records that come before 1930:

~~~ {.sql}
SELECT * FROM Visited WHERE dated<'1930-00-00';
SELECT * FROM Visited WHERE dated<"1930-01-01";
~~~

|ident|site|dated |
Expand All @@ -54,7 +54,7 @@ we get two results,
and if we select the ones that come during or after 1930:

~~~ {.sql}
SELECT * FROM Visited WHERE dated>='1930-00-00';
SELECT * FROM Visited WHERE dated>="1930-01-01";
~~~

|ident|site|dated |
Expand All @@ -68,15 +68,15 @@ SELECT * FROM Visited WHERE dated>='1930-00-00';
we get five,
but record #752 isn't in either set of results.
The reason is that
`null<'1930-00-00'`
`null<'1930-01-01'`
is neither true nor false:
null means, "We don't know,"
and if we don't know the value on the left side of a comparison,
we don't know whether the comparison is true or false.
Since databases represent "don't know" as null,
the value of `null<'1930-00-00'`
the value of `null<'1930-01-01'`
is actually `null`.
`null>='1930-00-00'` is also null
`null>='1930-01-01'` is also null
because we can't answer to that question either.
And since the only records kept by a `WHERE`
are those for which the test is true,
Expand Down
2 changes: 1 addition & 1 deletion 07-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ SELECT rowid, * FROM Person;
>
> ~~~ {.sql}
> SELECT Site.name FROM Site JOIN Visited
> ON Site.lat<-49.0 AND Site.name=Visited.site AND Visited.dated>='1932-00-00';
> ON Site.lat<-49.0 AND Site.name=Visited.site AND Visited.dated>='1932-01-01';
> ~~~
> ## Who has been where? {.challenge}
Expand Down

0 comments on commit 0ef5114

Please sign in to comment.