Create INDEX in SQL

Creates an index named “name_index” on the “name” column in the “User” table

CREATE INDEX name_index ON User (name);

If you want to create an index on a combination of columns, you can use separated by commas:

CREATE INDEX index1 ON User (name,age);

Leave a Reply

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