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 |
|
alex100
Starting Member
5 Posts |
Posted - 2010-09-18 : 07:30:39
|
| Hi,when i select from the same table twice(using alases), I get more records than i expected.why does it occures ? Regards,Alexthis is my table -column_ID1 2 3after executing the following queryselect T1.column_IDfrom table_1 as T1, table_1 as T2i get those results :column_ID123123123 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-09-18 : 07:34:45
|
You are joining without any condition so each possible pair is created.It is a cartesian product.http://en.wikipedia.org/wiki/Cartesian_product No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
alex100
Starting Member
5 Posts |
Posted - 2010-09-18 : 07:44:36
|
| Thanks for the answer. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-09-18 : 09:38:04
|
welcome  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|