You need to ensure that the query uses EmployeeName

You have a Microsoft SQL Azure database that contains a table named Employees.

You create a non-clustered index named EmployeeName on the name column.

You write the following query to retrieve all of the employees that have a name that starts
withthe letters JOH:
You discover that the query performs a table scan.
You need to ensure that the query uses EmployeeName.
What should you do?

You have a Microsoft SQL Azure database that contains a table named Employees.

You create a non-clustered index named EmployeeName on the name column.

You write the following query to retrieve all of the employees that have a name that starts
withthe letters JOH:
You discover that the query performs a table scan.
You need to ensure that the query uses EmployeeName.
What should you do?

A.
Recreate EmployeeName as a unique index

B.
Recreate EmployeeName as a clustered index

C.
Replace LEFT(name,3) = ‘JOH’ by using name like ‘JOH%’

D.
Replace LEFT(name,3) = ‘JOH’ by using substring(name, 1, 3) = ‘JOH’



Leave a Reply 0

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