Home > comp > gb.db.mysql > _index > add 
  [3.0]
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
Add
Creates an index to a table.

Index: Is the mane for the index.
Columns: Is an array containing all the fields names that form the index.
Table: Is the table to use, if none is provided, then the current table is used.

Examples

Dim hCon As New Connection

With hCon
  .Type = "mysql"
  .Port = "3306"
  .Host = "localhost"
  .User = "root"
  .Password = "mypass"
  .Name = "Gambas"
  .Open()
End With

hCon.MySQL.Index.Add("idx_actor_id", ["actor_id", "first_name"], "actor")

MySQL statement: CREATE INDEX `idx_actor_id` ON `actor` (`actor_id`, `first_name`)