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 |
|
drew22299
Starting Member
26 Posts |
Posted - 2009-01-22 : 07:58:05
|
| Hi,Is any difference in joining tables if you put the other table name in the from clause?for example, the two queries below return the same results but the table names are different in the from clause - is there any situation where it would be improtant which table name goes after from?select User.UserUID, User.Username, LoginDetails.LastLoginfrom LoginDetailsInner Join User ON LoginDetails.UserUID= User.UserUIDorder by LoginDetails.LastLogin ascselect User.UserUID, User.Username, LoginDetails.LastLoginfrom UserInner Join LoginDetails ON User.UserUID = LoginDetails.UserUIDorder by LoginDetails.LastLogin asc |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-01-22 : 07:59:29
|
| there is no difference in inner join it will check as 1-1 relation it will differ from left , right joins |
 |
|
|
drew22299
Starting Member
26 Posts |
Posted - 2009-01-22 : 08:13:51
|
| Thanks! |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-01-23 : 00:19:14
|
welcome |
 |
|
|
|
|
|