How to show the department in output even if it does not any emaployee

Posted by Shubham under Sql Server on 8/1/2012 | Points: 10 | Views : 802 | Status : [Member] | Replies : 1
How to show the department in output even if it does not any emaployee ?

Thanks&Regards:-
Shubham Choudhary
Software Engineer
www.facebook.com/shubham.kunar



Responses

Posted by: Pandians on: 8/1/2012 [Member] [MVP] Silver | Points: 25

Up
0
Down
Check It out!

Use LEFT JOIN:- If you have Joined Department and Employee table
Select E.Column, D.Column From Department D Left Join Employee E

On (D.DeptID = E.DeptID)
Go
Department Info will be fetched In case if you don;t have Employee info for a department!

Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Shubham, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response