i want to join 2 mysql tables .but join information is in a separate table .let's say i have 3 table named student ,course and reg contain id of student and course he does. 

```
student table

    s_id | name
    1    | miki    
    2    | foly    
    3    | oski  

course table    
        c_id | name
        101  | c++    
        102  | java    
        103  | ruby 

reg  table

    s_id | c_id
    1    | 101    
    1    | 102    
    2    | 101 

```

now i want to get all the course someone do.i wrote sql query for that without using join query .but i want to do same thing using join query .this is my query

```
SELECT c.name FROM student as s,course as c,reg as r where r.s_id=s.s_id and r.c_id=c.c_id and s.name='miki';

```