• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

how to use with index query hint in SQL Server Joins

Im tyring to use with index clause in SQL Server Joins but getting syntax errors. on SQL 2005

Can someone helpout with a sample
0
dba2dba
Asked:
dba2dba
  • 2
1 Solution
 
cyberkiwiCommented:
select * from tbl with (index(indexname,index2name))
select * from tbl with (index(indexname))
select * from tbl t1 with (index(indexname)) inner join tbl2 .....

put the with(index()) next to the table after the alias
0
 
cyberkiwiCommented:
http://msdn.microsoft.com/en-us/library/ms187373.aspx

section INDEX

INDEX ( index_value [ ,... n ] ) | INDEX = (index_value)
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now