skip to main content
Part 3: The 32-Bit Drivers : The Btrieve (Pervasive.SQL) Driver : Create and Drop Index Statements : Create Index
  
Create Index
The Create Index statement for Btrieve files has the form:
CREATE [UNIQUE] INDEX index_name ON table_name ([field_name [ASC | DESC] [,field_name
[ASC | DESC]]...)
Unique means that Btrieve does not let you insert two records with the same index values.
index_name is the name of the index.
table_name is the name of the table on which the index is to be created.
ASC tells Btrieve to create the index in ascending order. DESC tells Btrieve to create the index in descending order. By default, indexes are created in ascending order. For example:
CREATE INDEX lname ON emp (last_name)