1 Answer

0 votes
by
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.

Related questions

0 votes
asked Sep 7, 2019 in Big Data | Hadoop by john ganales
0 votes
asked Sep 7, 2019 in Big Data | Hadoop by john ganales
...