MySql MariaDatase INDEX

Post Reply
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

MySql MariaDatase INDEX

Post by mauri.menabue »

Hi all,
I would like to know how to remove an index on a MySql MariaDatase table.
To create an index, the 'UNIQUE' clause is used. How to delete an index?

how to build compound index INDEX ON CLI_COD + STR(CLI_FAT,12,2) + DTOS(date())
TIA
Maurizio Menabue
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: MySql MariaDatase INDEX

Post by vilian »

TO REMOVE
oCN:Execute("ALTER TABLE your_table DROP INDEX your_index")

TO CREATE
oCN:Execute("ALTER TABLE your_table ADD INDEX your_index(`field1`, `field2`)")
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Re: MySql MariaDatase INDEX

Post by mauri.menabue »

Hi all
Thank Vilian
is also possible : oCN:Execute("ALTER TABLE your_table ADD INDEX your_index(`field1`, `My_function()`)")
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: MySql MariaDatase INDEX

Post by vilian »

I think no.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Post Reply