Create Index statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Creates an index for a column in an open table. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Create Index On table ( column )

table is the name of an open table.

column is the name of a column in the open table.

Description

The Create Index statement creates an index on the specified column. MapInfo Pro uses Indexes in operations such as Find. Indexes also improve the performance of queries in general.

Note: MapInfo Pro cannot create an index if the table has unsaved edits. Use the Commit Table statement to save edits.

Example

The following example creates an index for the "Capital" field of the World table.

Open Table "world" Interactive 
Create Index on World(Capital)

See Also:

Alter Table statement, Create Table statement, Drop Index statement, Commit Table statement