The following gives brief overview of some data types present in Hive:

Numeric Types String Types Date/Time Types Complex Types

Hive Numeric Data Types:

Hive String Data Types:

Hive Date/Time Data Types:

Hive Complex Data Types:

How to Create and Drop Databases in Hive

Following are the steps on how to create and drop databases in Hive. Step 1: Create Database in Hive For creating a database in Hive shell, we have to use the command as shown in the syntax below:- Syntax:

Create database

Example: -Create database “guru99”

From the above screen shot, we are doing two things

Creating database “guru99” in Hive Displaying existing databases using “show” command In the same screen, Database “guru99” name is displayed at the end when we execute the show command. Which means Database “guru99” is successfully created.

Step 2: Drop Database in Hive For Dropping database in Hive shell, we have to use the “drop” command as shown in the syntax below:- Syntax:

Drop database

Example: -Drop database guru99

In the above screenshot, we are doing two things

We are dropping database ‘guru99’ from Hive Cross checking the same with “show” command In the same screen, after checking databases with show command, database”guru99″ does not appear inside Hive. So we can confirm now that database “guru99” is dropped