Categories

1 Answer

Sep 8, 2019
Hive - Drop Table

Hive facilitates us to drop a table by using the SQL drop table command. Let's follow the below steps to drop the table from the database.

Let's check the list of existing databases by using the following command: -

hive> show databases;  

Hive Drop Table

Now select the database from which we want to delete the table by using the following command: -

hive> use demo;  

Hive Drop Table

Let's check the list of existing tables in the corresponding database.

hive> show tables;  

Hive Drop Table

Now, drop the table by using the following command: -

hive> drop table new_employee;   

Hive Drop Table

Let's check whether the table is dropped or not.

hive> show tables;  

Hive Drop Table

As we can see, the table new_employee is not present in the list. Hence, the table is dropped successfully.
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Sep 7, 2019 in Big Data | Hadoop
Sep 7, 2019 in Big Data | Hadoop
Oct 12, 2019 in Big Data | Hadoop
...