Exam: DP-900: Microsoft Azure Data Fundamentals 0 Likes

Which T-SQL statement should be used to instruct a database management (DP-900)

Updated on 11/18/2024

Which T-SQL statement should be used to instruct a database management system to use an index instead of performing a full table scan?

A. SELECT
B. WHERE
C. JOIN


Solution

Correct answer: B. WHERE.
In T-SQL, the WHERE clause is primarily used to filter rows based on a condition, and it helps the database management system decide whether to use an index or perform a full table scan.

Why not A or C?
A. SELECT: The SELECT statement specifies what columns to retrieve but doesn't inherently influence whether an index is used.
C. JOIN: While JOIN operations can utilize indexes (e.g., on foreign key columns), it's the ON clause in the JOIN that might direct index use. This isn't directly related to instructing the DBMS to use an index.
To encourage index use in queries, ensure indexes exist on columns frequently used in WHERE, ON, or ORDER BY clauses.

Category: Core Data Concepts

There are no comments yet.

Authentication required

You must log in to post a comment.
Log in to like this solution

Log in

Support us!
Subscribe Now

Cookies Consent

We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All" you consent to our use of cookies. Privacy Policy.