User Tools

Site Tools


Sidebar

HPL/SQL is included to Apache Hive since version 2.0

create-database

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== CREATE DATABASE Statement ====== CREATE DATABASE statement allows you to create a database. **Syntax**: <code language=sql> CREATE DATABASE | SCHEMA [IF NOT EXISTS] dbname_expr [COMMENT comment_expr] [LOCATION path_expr] </code> **Example**: Create a database named //testYYYYMMDD// (current date): <code language=sql> create database 'test' || replace(current_date, '-', ''); </code> **Compatibility:** Hive **Version:** HPL/SQL 0.3.17 See also: * [[drop-database|DROP DATABASE]] * [[use|USE]]