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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 can we put 2 conditions in inner join

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-10-24 : 10:53:47
pls:
1/ can we do it this way:
inner join Table2 ON table1.fld1=table2.fld21 AND table1.fld12=table2.fld22
2/also:
what s the difference between join , iner join and left join
Thanks .

mr_mist
Grunnio

1870 Posts

Posted - 2006-10-24 : 10:56:56
1) Yes. Though depending on your intention you may not actually get the result you are after.

2) Join is inner join by default. Left join returns you rows in the first table regardless of the second.

-------
Moo. :)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-24 : 10:57:59
1 Yes
2 Read them in sql server help file


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-10-24 : 11:01:41
INNER JOIN = JOIN
LEFT OUTER JOIN = LEFT JOIN
RIGHT OUTER JOIN = INVERSE(LEFT JOIN)
FULL OUTER JOIN = Rarely used
CROSS JOIN = Dr. J Smith, Retired
THETA JOIN = Little understood
COUPLE JOIN = Good time
TRIPLE JOIN = Better time




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-24 : 11:04:30
quote:
Originally posted by X002548

INNER JOIN = JOIN
LEFT OUTER JOIN = LEFT JOIN
RIGHT OUTER JOIN = INVERSE(LEFT JOIN)
FULL OUTER JOIN = Rarely used
CROSS JOIN = Dr. J Smith, Retired
THETA JOIN = Little understood
COUPLE JOIN = Good time
TRIPLE JOIN = Better time




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam








Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -