You need to ensure that the query uses the index

You create a table named Customers by using the following code segment:

You create a non-clustered index named IX_Name on the name column.
You write the following query to retrieve all of the customers that have a name that starts
with the letters SMI:

You discover that the query performs a table scan.
You need to ensure that the query uses the index.
What should you do?

You create a table named Customers by using the following code segment:

You create a non-clustered index named IX_Name on the name column.
You write the following query to retrieve all of the customers that have a name that starts
with the letters SMI:

You discover that the query performs a table scan.
You need to ensure that the query uses the index.
What should you do?

A.
Replace LEFT(name,3) = ‘smi’ by using name like ‘smi%’

B.
Replace LEFT(name,3) = ‘smi’ by using substring(name,l,3) = ‘smi’

C.
Recreate IX_Name as a unique index

D.
Recreate IX Name as a clustered index



Leave a Reply 1

Your email address will not be published. Required fields are marked *