Documentation Index
Fetch the complete documentation index at: https://mintlify.com/A-Point-Systems-ltd/ms-sql-mcp/llms.txt
Use this file to discover all available pages before exploring further.
DropTable is a typed wrapper for DROP TABLE operations. It is marked ReadOnly=false, Destructive=true in MCP metadata — MCP-aware clients must surface a confirmation prompt to the user before executing this tool. Unlike CreateTable and InsertData, DropTable shares its destructive classification with ExecuteSQL and UpdateData.
Parameter
A complete
DROP TABLE T-SQL statement. Schema-qualified names (e.g. dbo.MyTable) are required to avoid ambiguity. Use the IF EXISTS guard when the table may or may not exist to prevent a SQL error.Return value
DropTable returns a DbOperationResult object:
AI Insights integration
On success,DropTable calls QueueInsightDdlProcessing() to enqueue background DDL audit processing. The database-level DDL_Audit trigger captures the DROP TABLE event in dbo.DDL_AuditLog. On the next reconciliation pass, the background service detects the fingerprint drift, archives the table’s cached SchemaInsights row to AIInsights.InsightHistory, and marks it with insightFreshness: StaleArchived.
If INSIGHTS_AUTOPOPULATE is enabled and the table is later recreated with the same name, a fresh baseline insight will be generated automatically on the next introspection call.
Examples
DROP TABLE with IF EXISTS (recommended)
DROP TABLE without IF EXISTS guard
Without
IF EXISTS, the statement raises an error if the table does not exist. Prefer the IF EXISTS variant in scripts that may run more than once.DROP multiple tables in sequence
Each call toDropTable accepts a single statement. To drop multiple tables, call DropTable once per table — respecting foreign-key dependency order (child tables before parent tables).