Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML
IMCreator - Free Website Builder

SQL Create Index

Indexes can be created against a table to make searches more efficient. A database index is similar to an index of a book - a book index allows you to find information without having to read through the whole book. A database index enables the database application to find data quickly without having to scan the whole table.

Indexes can have a slight impact on performance so you should only create indexes against tables and columns that will be frequently searched against. For example, if users of your application often search against the LastName field then that field is a great candidate for an index.

You create an index using the CREATE INDEX command.

SQL syntax

Code

Example

Code

Enjoy this page?

  1. Link to this page (copy/paste into your own website or blog):
  2. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!