Your tables should look like this:
Code:
Table1 - UserDetails
+-------------------+
| StudentID | Name |
+-------------------+
| 2 | Dan |
--------------------+
Table2 - CourseAssignment
+----------------------------------+
| AssignID | StudentID | CourseID |
+----------------------------------+
| 1 | 2 | 100 |
| 2 | 2 | 104 |
-----------------------------------+
Table3 - CourseDetails
+----------------------------------+
| CourseID | CourseDesc |
+----------------------------------+
| 100 | Year 10 Science |
| 104 | Year 10 Maths |
-----------------------------------+
I've added a primary key to Table2, otherwise you can't use it for many-to-one relationships, and done what I think you intended for Table3. Giving the ID fields more useful names also makes it far easier when you come to build relationships. Same goes for table names without spaces in (as above).
Now you can find all the details about a course with this example query:
Code:
SELECT * FROM `CourseDetails` WHERE `CourseID`=100;
And the courses being taken by a student with the query:
Code:
SELECT `CourseID` FROM `CourseAssignment` WHERE `StudentID`=2;
Put the two together:
Code:
SELECT CourseDetails.* FROM CourseAssignment LEFT JOIN CourseDetails ON CourseAssignment.CourseID=CourseDetails.CourseID WHERE CourseAssignment.StudentID=2;
(disclaimer: I did this in my head, so I accept no responsibility if it DROPs your database without warning
)