For example I have two tables. The first table is student while the second table are the courses that the a student is taking. How can I use a select statement so that I can
Generally, what you're talking about is a join:
SELECT
S.*,
SC.*
FROM
Students S
INNER JOIN Student_Courses SC
ON S.student_id = SC.student_id
However, that will give you one row per course. SQL doesn't make it easy to get the set of courses as a comma delimited list in a single row (that's not a set-based operation). Depending on the vendor, there are different ways to do it, involving looping.