• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

What's wrong with this inner join query?

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?
1 Solution
you are missing the second tablename ...

  from registration inner join songwriting_receipts
    on songwriting_receipts.contestant_id = registration.id
brucegustPHP DeveloperAuthor Commented:
Got it!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now