comp • gb.mysql • _table • delete

_Table.Delete (gb.mysql)

Sub Delete ( Tables As String[] [ , IfExists As Boolean ] )

Drops one or more tables.

Tables: Is an array containing all the tables names to be dropped.
IfExists: Accepts True or False, if True is given, then "IF EXISTS" is added to the statement.

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.Table.Delete(["Gambas1", "Gambas2"], True)

MySQL statement: DROP TABLE IF EXISTS `Gambas1`, `Gambas2`