How can I do an outer join in MySQL workbench version 5.2.30 CE

Dear Experts,
I want to do an outer join on two tables which both have a field containing an email address.  

SELECT * from user LEFT JOIN GIFTCODES  WHERE USER.email=GIFTCODES.userEmail;

This fails to compile.  The where clause is rejected.

I am trying to implement an example at this URL:

http://dev.mysql.com/doc/refman/5.0/en/outer-join-simplification.html

The example looks like this:

SELECT * T1 LEFT JOIN T2 ON P1(T1,T2)
  WHERE P(T1,T2) AND R(T2)

I do not understand how to modify "P1".  If I type it in literally I get the error message "Survey.P Does not exist".

Can anyone help?
Best Wishes,
Phil
LVL 1
PTRUSCOTTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulfreelancerCommented:
>>"Survey.P Does not exist".

Could you post the actual query being used please? This way we can avoid "translation" and our advice can be very specific.
0
chaauCommented:
Use ON instead of WHERE:

SELECT * from user LEFT JOIN GIFTCODES  ON USER.email=GIFTCODES.userEmail;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PTRUSCOTTAuthor Commented:
perfect
0
PortletPaulfreelancerCommented:
and much to my horror I missed it :(
note to self: time for a eye test
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.