SQL INDEX Statement

The SQL INDEX statement is used to create indexes in tables OR view; the Indexes are used to find data from tables quickly. The NDEXES should not be used on columns that contain a high number of NULL values.

SQL CREATE INDEX Syntax

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

CREATE UNIQUE INDEX Syntax

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

SQL Indexes Conditions

  • The SQL Indexes are used to retrieve data from the database more quickly.
  • Make sure the INDEX can be Unique, like SQL UNION constraint.
  • The Indexes should not be used on small tables.

DROP INDEX In MS Access

DROP INDEX index_name ON table_name;

DROP INDEX In SQL Server

An index can be dropped using SQL DROP command:

DROP INDEX table_name.index_name;

DROP INDEX In MySQL

ALTER TABLE table_name
DROP INDEX index_name;

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)