SQL Index


Prev Tutorial Next Tutorial

SQL Index

Index statement is used create indexes in table. By using index you can retrieve data without reading whole date, it means by using index you can retrieve data fastly.

Note: Updating a table with indexes takes more time than updating a table without index, because the indexes also need an update.

Advantage of Index

  • Find data fast
  • Find data more quickly and efficiently

Syntax

	
CREATE INDEX index_name
ON table_name (column_name)

Note: Index syntax is vary from database to database.

Example

CREATE INDEX PIndex
ON Employee (name)

You can also create index for multiple column at a time

Example

CREATE INDEX PIndex
ON Employee (name, salary)

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements