Cloudflare D1 icon

Cloudflare D1

Execute operations against Cloudflare D1 serverless databases. Supports structured operations (Insert, Select, Update, Delete), raw SQL queries, and can be used as a tool by AI Agents.

Table Management → Drop Table

AI-generated

Summary

Drop a table from the selected Cloudflare D1 database, optionally only if it exists.

Inputs

  • databaseId (required) — The unique identifier of the Cloudflare D1 database.
  • dropTable (required) — The table to drop; can be selected from a list or entered by name.
  • dropIfExists — Whether to drop the table only if it exists (default true).

Output shape

An object containing success flag, results array, and metadata about the drop operation

The response includes a success boolean and metadata; results may be empty.

Examples

Example 1: Delete table 'users' if it exists

Database ID = '123abc', Table = 'users', If Exists = true

Example 2: Permanently remove table 'logs'

Database ID = '123abc', Table = 'logs', If Exists = false

Example 3: Drop a table by name

Database ID provided, Table name entered directly, If Exists default true

Discussion