I have two tables like below:
TableA --> categoryId(pk), categoryParentId, catName
TableB --> empId(pk), categoryId, empName, empDesignation

I want to get all catName with respective categoryId from TableA where categoryId=2 of TableB is equal to categoryParentId=2 of TableA. Please help.
Result:
1002   SE
1003   MD
 
     
     
     
     
     
     
     
    