Hive Basic Commands(database)


----------------------------------------------------------------------------------------------------------------------------

CREATE DATABASE

----------------------------------------------------------------------------------------------------------------------------

create database mhtprabhu;

create database demo_1
WITH DBPROPERTIES ('creator' = 'Gaurav Chawla', 'date' = '2019-06-03');  

hive> describe database extended demo_1;






----------------------------------------------------------------------------------------------------------------------------

DROP DATABASE:
----------------------------------------------------------------------------------------------------------------------------

hive> drop database mhtprabhu_new;
message:Database mhtprabhu_new is not empty. One or more tables exist.)

hive> drop database mhtprabhu_new cascade;
hive> use  mhtprabhu_new;
FAILED: SemanticException [Error 10072]: Database does not exist: mhtprabhu_new