INDEX

SQL INDEX Keyword

The INDEX keyword is used to create indexes on one or more columns of a table to improve the performance of data retrieval. Indexes help speed up queries, especially on large datasets.

Tutorials dojo strip

SQL INDEX Syntax

CREATE INDEX index_name
ON table_name (column1, column2, ...);
DROP INDEX index_name;

SQL INDEX Create an Index on a Column Example

CREATE INDEX idx_last_name
ON Patients (last_name);

SQL INDEX Create an Index on Multiple Columns

CREATE INDEX idx_name_gender
ON Patients (first_name, gender);

SQL INDEX Drop an Index Example

DROP INDEX idx_last_name;

SQL INDEX Labs

Tutorials dojo strip
Scroll to Top