Pleae Help….. using distinct………inner join | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Pleae Help….. using distinct………inner join

I am quite new in sql . I don’t understand this sql Select distinct data1, data2 from test inner join test2 on data1=data2 Anyone please explain for me. It will be good if you can give an example. Thanks.
Hi,<br />it will shows you the distinct rows that are equal/matched from table test and test2 .<br /><br /> <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">From BOL<br /><br />Using Inner Joins<br />An inner join is a join in which the values in the columns being joined are compared using a comparison operator.<br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br />[<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br />Regards<br /><br />Hemantgiri S. Goswami<br />[email protected]<br />"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemantgiri Goswami<br />

This will be clearer Select distinct T1.data1, T1.data2 from test T1 inner join test2 T2 on T1.data1=T2.data2 Refer this for more information
http://www.sql-server-performance.com/tuning_joins.asp Madhivanan Failing to plan is Planning to fail
]]>