0
MySQL Joins
I have a table called student which has StudentID 1-4 and student first name and lastname I have a StudenCourse table which has studentID 1-4 also fields with classes enrolled Now I have get Student First name that is also in Student Course table. My query is SELECT Student.StudentID.Student.StudentFirstName,Student_Course.StudentID FROM Student INNER JOIN Student_Course ON Student.StudentID = Student_Course.StudentID WHERE Student.StudentID = Student_Course.StudentID AND ? Could you please help!
1 Respuesta
+ 1
What do you want to get with the request?
You have a point instead of a comma in your select.
You don't need the WHERE on the ids because you already indicate it in the ON of Inner join (or you remove ON and leave the WHERE,...).
If you want other information in the query, indicate it in the select.