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 |
|
neil_akoga
Yak Posting Veteran
56 Posts |
Posted - 2010-03-08 : 10:34:15
|
| ok, to settle an argument in our office and maybe help my sanity is the following possible and how would i do it.i have 2 tablestblUsersuserIDusernameuserEmailetcand tblSpecialPowerspowerIDuserIDspecialPoweretcnow not every user will have an entry in tblSpecialPowers but i still want to join the 2 tables and bring back ALL of the entries in tblUSers as followsuserID / username / specialPower1 / wolverine / big claws2 / spiderman / shoots webs3 / batman / NULL4 / hulk / green balls5 / ordinary man / NULLAny help is appreciated as i can't figure a way of doing it so that i can join the 2 tables but still bring back users that don't have a special power entry? |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2010-03-08 : 10:39:13
|
| hint: LEFT JOIN |
 |
|
|
neil_akoga
Yak Posting Veteran
56 Posts |
Posted - 2010-03-08 : 10:50:05
|
| oh dear....lol..sorry everybody. i think my brain needs to sleep somewhere for a week or something :) |
 |
|
|
|
|
|