Skip to contents

Drops a database from the current DuckDB or MotherDuck connection if it exists. Prints a CLI status report after performing the operation.

Usage

delete_database(.con, database_name)

Arguments

.con

A valid `DBI` connection (DuckDB / MotherDuck).

database_name

Name of the database to drop.

Value

Invisibly returns `NULL`. Side effect: drops the database and prints CLI status messages.

Details

- Executes `DROP DATABASE IF EXISTS <database_name>` to remove the database. - Intended for DuckDB or MotherDuck connections. - Prints user, database and action details using CLI helper functions.

See also

[DBI::dbExecute()]