This statement removes 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
The following code example shows how to use the DROP INDEX statement in a SQL query.
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