tencent cloud

문서Data Lake Compute

DROP DATABASE

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 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;




도움말 및 지원

문제 해결에 도움이 되었나요?

피드백