DROP INDEX

This statement enables you to remove an index from a field.

Syntax

DROP INDEX tablename,indexname

Parameters

tablename
Specifies the name of the table from which to remove the index.
indexname
Specifies the name of the index to remove from the table.

Return Values

One of the following error values can be returned:

Remarks

Fields can have only one index. You should delete the existing index for a field before creating a new one.

Example

Dim rs, i, L1
Set rs = CreateObject("adoce.recordset")
rs.open "drop index indexme.i1"
rs.open "indexme", "", 1, 3
rs.addnew "f1", "a"
rs.addnew "f1", "A"
rs.addnew "f1", "B"
rs.addnew "f1", "c"
rs.addnew "f1", "C"
rs.addnew "F1", "b"
rs.addnew "f1", "a"
rs.addnew "f1", "B"
rs.Close
rs.open "select f1 from indexme order by f1"
For i = 0 To rs.recordcount - 1
L1 = L1 & rs.fields("f1").Value
rs.MoveNext
Next
rs.Close
MsgBox L1
Set rs = Nothing