i have 2 tables ( dept and employee )
dept table structure
sno deptname
1 hr
2 finance
3 accounts
employee table structure
empsno (pk ) deptsno( Fk) empname
1 1 a
2 1 b
3 1 c
4 1 d
5 2 e
6 2 fry
7 2 ghy
8 2 abc
9 3 yun
10 3 john
11 3 ppp
12 3 xyz
i want to make query
to show record like this
this should be resuls after query executing
empsno deptsno empname
3 1 c
7 2 ghy
11 3 ppp