15,917,971 members
See more:
i have two tables like

TABLE 1 : FACULTY_DETAILS

fac_det_id(pk)........fname...........availability
.....1......................... xxx.................full time
.....2......................... yyy.................part time
.....3......................... zzz.................weekdays
.....4......................... aaa.................partime

TABLE 2: FACULTY

faculty_id(pk)..........course_id........fac_det_id(fk)
.....1..............................1......................2
.....2..............................2......................3
.....3..............................3......................1
.....4..............................4......................3
.....5..............................3......................4

when i give course id
i need fname ,availability in table1 and faculty_id in table 2

ie if i give course_id=3 then i need like

faculty_id..........fname...........qualification
.....2...................xxx................full time
.....5...................aaa................partime
Posted

## Solution 1

SQL
```SELECT fname, availability, faculty_id
FROM faculty a, faculty_details b
WHERE a.fac_det_id = b.fac_det_id
AND course_id =1```

solved myself

## Solution 2

SQL
```select  faculty_id,fname,availability
from table1 t1
JOIN table2 t2
ON t1.fdId=t2.fdId
where courseid =3```