This topic contains 0 replies, has 1 voice, and was last updated by Avikumar 2 years, 7 months ago.
Drop Database Statement:-
Drop Database is a statement that drops all the tables and deletes the database. Its syntax is as follows:
DROP DATABASE StatementDROP (DATABASE|SCHEMA) [IF EXISTS] database_name
The following queries are used to drop a database. Let us assume that the database name is userdb.
hive> DROP DATABASE IF EXISTS userdb;
The following query drops the database using CASCADE. It means dropping respective tables before dropping the database.
hive> DROP DATABASE IF EXISTS userdb CASCADE;
The following query drops the database using SCHEMA.
hive> DROP SCHEMA userdb;
Mail (will not be published) (required):
Your Name (required)
Your Email (required)
Enter the destination URL
Or link to existing content