Drop a Vector Table
Use the drop vector table operation to permanently delete a vector table and all of its data.
The operation drops the specified vector table, including all vectors, metadata, and associated indexes.
Caution: This operation is irreversible. All data in the table will be permanently deleted.
A table name is required as input. An error is raised if the provided table does not exist.
See the following for an example of dropping a vector table using drop_vector_table:
from oracle_vecdb import OracleVecDB, Configuration
client = OracleVecDB(Configuration(
rest_url="https://<host>/ords/<schema>/_/db-api/stable/vecdb/",
access_token="<bearer-token>", # or username="<user>", password="<pass>"
))
response = client.drop_vector_table(name="old_vectors")
print(response)
A JSON response is returned, confirming the table was dropped successfully.
Example response:
{
"message": "Table DEMO_PRODUCTS deleted successfully"
}
For more information about the drop_vector_table operation, see Python API Reference.
See the following example of dropping a table using DELETE /vecdb/vector-tables/{vector_table_name}:
curl -X DELETE \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Responses:
-
Example 200 response:
{ "message": "Table PRODUCT_VECTORS deleted successfully" } -
404 - table not found.
For more information about DELETE /vecdb/vector-tables/{vector_table_name}, see REST API Reference.
See how DBMS_VECTOR_DATABASE.DROP_MODEL can be used in the following example:
dbms_vector_database.drop_vector_table('product_vectors');
Example response:
{
"message": "Table PRODUCT_VECTORS deleted successfully"
}
For more information about the PL/SQL implementation, including parameters, see DROP_VECTOR_TABLE.