Link to home
Start Free TrialLog in
Avatar of burnedfaceless
burnedfaceless

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of burnedfaceless
burnedfaceless

ASKER

Thank you. My n00bness is showing.
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