?
Solved

What's wrong with this inner join query?

Posted on 2012-08-13
2
Medium Priority
?
425 Views
Last Modified: 2012-08-13
Here's my query:

select registration.email, registration.id, songwriting_receipts.contestant_id, songwriting_receipts.contest_end_date from registration inner join on songwriting_receipts.contestant_id = registration.id";

The message that I keep getting is:

1064: 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 'on registration.id = songwriting_receipts.contestant_id' at line 2

I've played with it and I can't figure out what I'm missing. Thoughts?
0
Comment
Question by:brucegust
2 Comments
 
LVL 25

Accepted Solution

by:
lwadwell earned 2000 total points
ID: 38287711
you are missing the second tablename ...

  from registration inner join songwriting_receipts
    on songwriting_receipts.contestant_id = registration.id
0
 

Author Comment

by:brucegust
ID: 38287888
Got it!

Thanks!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question