tencent cloud

All product documents
Data Lake Compute
DROP DATABASE
Last updated: 2024-08-07 17:11:45
DROP DATABASE
Last updated: 2024-08-07 17:11:45

Description

Supported engines: Presto and SparkSQL
Purpose: Delete specified database.

Statement

DROP {DATABASE | SCHEMA} [IF EXISTS] database_name [RESTRICT | CASCADE]

Parameter

DATABASE|SCHEMA: Specify the database or schema.
database_name: Database name
RESTRICT: The database is not deleted if it contains tables. If not specified, the RESTRICT mode is used by default.
CASCADE: All databases and tables are deleted forcibly.

Example

-- Drop the database and it's tables
DROP DATABASE test CASCADE;

-- Drop the database using IF EXISTS
DROP DATABASE IF EXISTS test;



Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon