DROP MODEL statement
The DROP MODEL statement allows users to drop an existing model.
Authorization
Single table cardinality estimation model objects do not have privileges defined directly on
them. Instead, the privileges associated with the base table will be used. As such, the privileges
held by the authorization ID of the statement must include at least one of the following privileges:
- DBADM
- SQLADM
- CONTROL privilege on the table
- SCHEMAADM on the schema of the table
- DROPIN on the schema of the table
- TENANTADM on the tenant the table is within
- DROPIN on the tenant the table is within
Syntax
Description
-
model-name
- Identifies the model to be dropped. The model-name must identify a model that exists at the current server (SQLSTATE 42704).
- ON table-name
- The ON table-name clause allows specification of the base table as an alternative to the model-name clause if the model is associated with a table. For example, for a single table cardinality model. This clause eliminates the need to find the model name of the model to be dropped if the underlying table name is already known. The table-name must identify a table that exists at the current server (SQLSTATE 42704). The table-name must also identify a table that has an associated model (SQLSTATE 4274O)
Example
- Drop the model on table
tpcds.store_sales
DROP MODEL ON tpcds.store_sales