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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Does SELF JOIN use HASH JOIN

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-10-07 : 07:43:42
Anand writes "Hi,

I read about HASH join on this web site. It was saying that least data will take up by build input and probe will do the next. In case of same table with two alias A and B (Employee table). My query would be....

SELECT B.EmpNm, A.Location FROM Employee A, Employee B WHERE
A.EmpNm = 'John' AND A.Location = B.Location

In case of single table with two alias....whether A Alias belongs to build input or B Alias belongs to probe input????

does query optimizer creates HASH JOIN for this query...!!!!

expecting reply sooner...

Regards,
S. Anand"

nr
SQLTeam MVY

12543 Posts

Posted - 2002-10-07 : 07:51:55
Why do you worry about it?
As long as the query works and is efficient enough for your purposes surely that's all you need.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -