top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What are the various types of Indexes in SQL/MySQL?

+1 vote
118 views
What are the various types of Indexes in SQL/MySQL?
posted Sep 28, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

IN SQL :

An Index is a database object used to retrieve the data fastly from the Tables.
An Index increases the performance of the database.

The basic syntax of CREATE INDEX is as follows:

CREATE INDEX index_name ON table_name;

Types:

  1. Single-Column Indexes: A single-column index is one that is created based on only one table column.

CREATE INDEX index_name ON table_name (column_name);

  1. Unique Indexes: Unique indexes are used not only for performance, but also for data integrity. A unique index does not allow any duplicate values to be inserted into the table.

CREATE UNIQUE INDEX index_name on table_name (column_name);

  1. Composite Indexes: A composite index is an index on two or more columns of a table

CREATE INDEX index_name on table_name (column1, column2);

  1. Implicit Indexes : Implicit indexes are indexes that are automatically created by the database server when an object is created. Indexes are automatically created for primary key constraints and unique constraints.
answer Sep 29, 2014 by Arun Gowda
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...