Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cjcclee
Starting Member
33 Posts |
Posted - 2008-07-24 : 15:37:14
|
I have two table A, B, one employee can have more than one depts in table A. compare table A and B, How can I get all the rows that do not have record in table B. for example as following, I want to get result dept SS Hours113 2222222 40111 33333333 30123 33333333 40A:dept SS Hours111 22222222 10113 22222222 40111 33333333 30123 33333333 40B:Dept SS111 22222222Thanks! |
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-07-24 : 15:53:33
|
homework? |
 |
|
cjcclee
Starting Member
33 Posts |
Posted - 2008-07-24 : 16:55:44
|
OK. I figure out.right outer join, then select those row is null.Thanks for reading my message! |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-24 : 16:59:57
|
quote: Originally posted by cjcclee OK. I figure out.right outer join, then select those row is null.Thanks for reading my message!
Left-outer join |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-25 : 01:04:58
|
or NOT IN |
 |
|
|
|
|