IF I PASS DEPATMENTDETAILS TABLE AND EMPLICENSE TABLE IN WHERE CAUSE ?OUTPUT QUERY IS
select * from DepartmentDetail inner join Department on DepartmentDetail.Id=Department.DeptId inner join Employee on Employee.Id=Department .EmpLicense.Id inner join EmpLicense on EmpLicense.Id=Employee.EmplolyeeId
like this i want

Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted May 5, 2016, 6:04 AM EDT
Satish Vellanki6 reputationPosted May 5, 2016, 8:47 PM EDT
Bhuvanesh MohankumarRank #310 · 8.1K reputationPosted May 5, 2016, 11:59 PM EDT
Hi Sakthi,
select * from DepartmentDetail
inner join Department on DepartmentDetail.Id=Department.DeptId
inner join Employee on Employee.Id=Department.EmpLicense.Id
inner join EmpLicense on EmpLicense.Id=Employee.EmplolyeeId
Better you write mutiple select Queries as per your logic and post here, then we will make it with proper join, because I can't figure out teh appropiate logic you are trying to achieve.
Write the query like this,
SELECT * FROM DepartmentDetail WHERE DepartmentDetail.Id in
Something like this which satisfies your logic and output you required.