drop-database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

drop-database [2016/03/03 14:35] (current)
dmtolpeko created
Line 1: Line 1:
 +====== DROP DATABASE Statement ======
  
 +DROP DATABASE statement allows you to drop a database.
 +
 +**Syntax**:
 +
 +<code language=sql>​
 +DROP DATABASE | SCHEMA [IF EXISTS] dbname_expr
 +</​code>​
 +
 +**Example**:​
 +
 +Drop a database named //​testYYYYMMDD//​ (current date):
 +
 +<code language=sql>​
 +drop database if exists '​test'​ || replace(current_date,​ '​-',​ ''​);​
 +</​code>​
 +
 +**Compatibility:​** Hive
 +
 +**Version:​** HPL/SQL 0.3.17
 +
 +See also:
 +  * [[create-database|CREATE DATABASE]]
 +  * [[use|USE]]