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 |
|
y0zh
Yak Posting Veteran
60 Posts |
Posted - 2010-04-23 : 06:55:23
|
| COuld you self join? SOme example maybe? |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-04-23 : 06:58:03
|
| Yes.select * from table t1 inner join table t2 on t1.id=t2.idPBUH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-23 : 06:58:36
|
quote: Originally posted by y0zh COuld you self join? SOme example maybe?
Read about self-join in SQL Server help fileIt has example codeMadhivananFailing to plan is Planning to fail |
 |
|
|
DBA in the making
Aged Yak Warrior
638 Posts |
Posted - 2010-04-23 : 09:06:23
|
quote: Originally posted by Idera Yes.select * from table t1 inner join table t2 on t1.id=t2.id
I can't imagine ever needing to do it that way.------------------------------------------------------------------------------------Any and all code contained within this post comes with a 100% money back guarantee. |
 |
|
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2010-04-23 : 11:33:32
|
maybe parent id of current keyquote: Originally posted by DBA in the making
quote: Originally posted by Idera Yes.select * from table t1 inner join table t2 on t1.id=t2.id
I can't imagine ever needing to do it that way.------------------------------------------------------------------------------------Any and all code contained within this post comes with a 100% money back guarantee.
|
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-04-23 : 13:44:05
|
quote: I can't imagine ever needing to do it that way.
Yes I know.I posted it because he wanted an 'example' which I thought is the most simplest one.PBUH |
 |
|
|
|
|
|