Updated on 2024-05-29 GMT+08:00

DROP TABLE

Syntax

DROP TABLE [ IF EXISTS ] table_name

Description

This statement is used to drop an existing table. If the optional parameter IF EXISTS is specified and the table to be deleted does not exist, no error is reported. The deleted data rows are moved to the recycle bin of HDFS.

Example

create table testfordrop(name varchar);
drop table if exists testfordrop;