Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)

Assume that in the employee table, I created an index(idx_name) on the emp_name column of the table.

Is there any need to explicitly specify the index name in the select clause or will it speed up the queries automatically? 

And If it is very necessary to be specified in the select clause then what will be the index for this?

1 Answer

0 votes
by (11.7k points)

Try out this syntax for testing the index:

SELECT * FROM Table WITH(INDEX(Index_Name))

The WITH statement will make the index to be used forcefully.

If you want to get more insights into SQL, check out this SQL Course from Intellipaat.

Browse Categories

...