I have a little problem with a SQL query. I have two tables :
Table registrations
- ID, name, course (Foreign key to courses.ID), adress
Table courses
- ID, name
I want to select all values from registration and the name of the course which ID is in registrations table.
My query:
SELECT courses.name, registrations.ID, registrations.name, registrations.course registrations.adress
FROM registrations
INNER JOIN courses
ON courses.ID = registrations.course
Can anyone tell me, where my mistake is?
Thank you!!