Dropping tables straightforward in qb
.
For dropping columns or constraints, see Alter.
Drop a table from the database.
Example:
SchemaBuilder
SQL (MySQL)
Drop a table from the database if it exists.
Example:
SchemaBuilder
SQL (MySQL)
Argument
Type
Required
Default
Description
table
string
true
The name of the table to drop.
options
struct
false
{}
Options to pass to queryExecute
.
execute
boolean
false
true
Run the query immediately after building it.
Argument
Type
Required
Default
Description
table
string
true
The name of the table to drop.
options
struct
false
{}
Options to pass to queryExecute
.
execute
boolean
false
true
Run the query immediately after building it.