hive Create Database and Table Statement Create Database


Example

Creating a database in a particular location. If we dont specify any location for database its created in warehouse directory.

CREATE DATABASE IF NOT EXISTS db_name 
COMMENT 'TEST DATABASE'
LOCATION /PATH/HDFS/DATABASE/;