drop Table
Drops an existing table from the database.
This function generates and executes a DROP TABLE IF EXISTS SQL statement. Using IF EXISTS prevents an error from being thrown if the table does not already exist in the database.
Example:
// Drop a table named "users"
schema.dropTable("users")Content copied to clipboard
This will execute an SQL statement similar to: DROP TABLE IF EXISTS "users";
Author
MOHAMMAD AZIM ANSARI
Parameters
table Name
The name of the table to be dropped. The name will be properly escaped to prevent SQL injection issues.
See also
Throws
if an error occurs while dropping the table.