Learn R Programming

motherduck (version 0.2.0)

delete_database: Drop a Database

Description

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)

Value

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

Arguments

.con

A valid DBI connection (DuckDB / MotherDuck).

database_name

Name of the database to drop.

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

Other db-manage: alter_table_schema(), copy_tables_to_new_location(), create_database(), create_if_not_exists_share(), create_or_replace_share(), create_schema(), create_table(), delete_and_create_schema(), delete_schema(), delete_table(), describe_share(), drop_share(), list_owned_shares(), list_shared_with_me_shares(), upload_database_to_md()