Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Saturday 23 August 2014

Index in MySql

Index helps queries to fetch data quickly. Index optional structure associated with the database to have direct access to the table row which in term improves the performance of the query.

Syntax of the Index is :-

CREATE INDEX INDEX_NAME on TABLE_NAME (COLUMN_NAME | [LIST]);

Below is the example:-

CREATE TABLE EMPLOYEE
(
EMP_ID INT,
EMP_NAME VARCHAR(20),
EMP_ADR VARCHAR(20), 
);

CREATE INDEX IND_EMP ON EMPLOYEE (EMP_ID);






Read Also:-  Create index in Oracle

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.