SQL CREATE INDEX
The CREATE INDEX statement is used to create indexes in tables.
Indexes allow the database application to find data fast; without reading the whole table.
CREATE INDEX index_name ON table_name (column_name)
Note: Duplicate value are allowed.
SQL CREATE UNIQUE INDEX Syntax:
CREATE UNIQUE INDEX index_name ON table_name (column_name)
Note: Duplicate values are not allowed.
CREATE INDEX PIndex ON Persons (LastName)
If you want to create an index on a combination of columns, you can list the column names within the parentheses, separated by commas.
CREATE INDEX PIndex ON Persons (LastName, FirstName)
Learn how to use SQL to store, query, and manipulate data. SQL is a special-purpose programming language designed for managing data in a relational database, and is used by a huge number of apps and organizations.
- Lectures 41
- Quizzes 0
- Duration 50 hours
- Skill level All levels
- Language English
- Students 0
- Certificate No
- Assessments Self