TheONkeyword specifies the field used by anindexwhen creating it in SQL.
Example Usage:
sql
CREATE INDEX idx_employee_name
ON Employees(Name);
Here, an indexidx_employee_nameis createdon the Name column.
Thisimproves query performancewhen filtering by Name.
Why Other Options Are Incorrect:
Option B (IN) (Incorrect):Used in queries to match values in a set, not for indexing.
Option C (UNIQUE) (Incorrect):Ensures a column has unique values but doesnot define an index field.
Option D (CHECK) (Incorrect):Used forvalidating column values, not for indexing.
Thus, the correct answer isON, as it defines thecolumn on which an index is created.
[Reference:SQL Indexing for Performance Optimization., ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit