A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mariadb.com/docs/server/reference/sql-statements/data-definition/drop/drop-database below:

DROP DATABASE | MariaDB Documentation

DROP DATABASE | MariaDB Documentation
  1. Reference
  2. SQL Statements
  3. Data Definition (DDL)
  4. DROP
DROP DATABASE
DROP {DATABASE | SCHEMA} [IF EXISTS] db_name

DROP DATABASE drops all tables in the database and deletes the database. Be very careful with this statement! To use DROP DATABASE, you need the DROP privilege on the database. DROP SCHEMA is a synonym for DROP DATABASE.

Important: When a database is dropped, user privileges on the database are not automatically dropped. See GRANT.

Use IF EXISTS to prevent an error from occurring for databases that do not exist. A NOTE is generated for each non-existent database when using IF EXISTS. See SHOW WARNINGS.

MariaDB 10.6.1 supports Atomic DDL.DROP DATABASE is implemented as

LOOP OVER ALL tables
  DROP TABLE tbl

Each individual DROP TABLE is atomic while DROP DATABASE as a whole is crash-safe.

Atomic DROP is not available.

DROP DATABASE bufg;
Query OK, 0 rows affected (0.39 sec)

DROP DATABASE bufg;
ERROR 1008 (HY000): Can't drop database 'bufg'; database doesn't exist

 \W
SHOW warnings enabled.

DROP DATABASE IF EXISTS bufg;
Query OK, 0 rows affected, 1 warning (0.00 sec)
Note (Code 1008): Can't DROP DATABASE 'bufg'; DATABASE doesn't exist

This page is licensed: GPLv2, originally from fill_help_tables.sql


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4