SQL Flow Field Guide

DROP DATABASE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

removes database (no row flow)

What changes

Input
catalog
Output or change
catalog: database

Syntax at a glance

DROP DATABASE [ IF EXISTS ] { database_name | database_snapshot_name } [ ,...n ] [ ; ]

Work example

A database is approved for retirement after data owners confirm the archive and restore plan.

Check dependencies, retention rules, final backup, consumers, and named approval before any removal.

Check your work The archive is verified and no active service or retention rule needs the database.

Open Microsoft Learn for full syntax, permissions, and details for your version.