thewebologist — 2013-10-06T05:47:31-04:00 — #1
In the Sitepoint book 'SimplySQL' we are asked to create two tables consisting of nothing but 1 column of numbers and are then asked to run the query:
A FULL OUTER JOIN B
This is causing the error:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OUTER JOIN B
ON a=b' at line 4"
Changing the "full" outer join to "left" brings a result. Please can someone explain to me what I'm missing, I've tried reading the MySQL documentation and googling for an explanation but I'm at a loss.
P.S. First time in a forum so please give me any necessary feedback regarding etiquette, etc.
thewebologist — 2013-10-06T07:49:15-04:00 — #2
My apologies, the book clears this up in a later chapter.
"an unfortunate error happens in at least one common database system. In MySQL, which doesn't support FULL OUTER JOIN despite it being standard SQL, the result is a syntax error...
If your database system does not support the FULL OUTER JOIN syntax, the same results can be obtained by a slightly more complex query called a union."
r937 — 2013-10-06T15:43:08-04:00 — #3
you did great
in hindisght i might have mentioned the mysql whoopsie at the first opportunity, eh
thewebologist — 2013-10-06T16:32:48-04:00 — #4
Thanks, was a bit nervous about posting.
I'm loving the book, as someone who knew nothing of SQL before reading, it's approachable and explains the complexities extremely well. I'm excited by the possibilities.
r937 — 2013-10-06T17:03:57-04:00 — #5
thanks for the kind words
a lot of work went into simplifying down those complexities