mysql syntax error

I'm working along side a book. I'm certain I copied this command out of the book verbatim. I'm getting an error message.

SELECT columns
FROM table1 INNER JOIN table2
 ON condition(s) for data to be related;


MySQL said:

#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 'condition(s) for data to be related
LIMIT 0, 30' at line 3

Any idea on what's incorrect?
Thanks
burnedfacelessAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Kim WalkerWeb Programmer/TechnicianCommented:
You are supposed to supply the "condition(s) for data to be related." For example, if both tables have a field named column1 with identical information:

SELECT columns
FROM table1 INNER JOIN table2
ON column1

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
burnedfacelessAuthor Commented:
Thank you. My n00bness is showing.
0
Kim WalkerWeb Programmer/TechnicianCommented:
Disregard my last comment. There's more that you have to supply and I confused ON with USING. You also have to supply the columns to be selected. For example:

SELECT table1.column1, table2.column2
FROM table1 INNER JOIN table2
ON table1.column1 = table2.column1

Open in new window

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
MySQL Server

From novice to tech pro — start learning today.