Step 1 : Login to hive using below command:
hive
Step 2 : Suppose you want to create a schema named as mydb1 , use below command
create schema mydb1;
Step 3 : To use this schema ,use below command :
use mydb1;
Step 4 : To see all the databases , use below command:
show databases;
OR
show schemas;
Step 5 : To see all the tables of a databases , use below command:
show tables;
Step 6 : To see the currently selected schema, use below command:
set hive.cli.print.current.db=true;
To see the above commands in action please visit our you tube channel.
Sharing is caring!