Sidebar

HPL/SQL is included to Apache Hive since version 2.0

create-database

CREATE DATABASE Statement

CREATE DATABASE statement allows you to create a database.

Syntax:

CREATE DATABASE | SCHEMA [IF NOT EXISTS] dbname_expr
  [COMMENT comment_expr]
  [LOCATION path_expr]

Example:

Create a database named testYYYYMMDD (current date):

create database 'test' || replace(current_date, '-', '');

Compatibility: MySQL, MariaDB, Hive

Version: HPL/SQL 0.3.17

See also: