First record has dept_id of 1. There are 2 matching records for this dept_id
Second record has dept_id of 1. There are 2 matching records for this dept_id
So total 4 records in the result. It works as expected.
There is no way the server could know that KA
matches R K
and not V K
Conclusion: don't use non-unique field for the join.