-1

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!!

Tobias Schäfer
  • 1,330
  • 2
  • 17
  • 35

1 Answers1

1

I solved the issue. The error was caused by an wrong configured conversion, courseID was text and was not parsed to integer (courses.ID) correctly. Thanks for your help.

Tobias Schäfer
  • 1,330
  • 2
  • 17
  • 35