• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. Query Performance Optimization
  5. Troubleshooting Errors Using SQL Statements
  6. DROP TABLE Fails to Be Executed

DROP TABLE Fails to Be Executed

Problem

DROP TABLE fails to be executed in the following scenarios:

  • A user runs the \dt+ command and finds that the table_name table does not exist. When the user runs the CREATE TABLE table_name command, an error message indicating that the table_name table exists is displayed. When the user runs the DROP TABLE table_name command, an error message indicating that the table_name table does not exist is displayed. In this case, the table_name table cannot be recreated.
  • A user runs the \dt+ command and finds that the table_name table exists in the database. When the user runs the DROP TABLE table_name command, an error message indicating that the table_name table does not exist is displayed. In this case, the table_name table cannot be recreated.

Possible Causes

The table_name table exists on some nodes only.

Troubleshooting Method

In the preceding scenarios, if the DROP TABLE table_name command fails to be executed, run the DROP TABLE if exists table_name command to successfully drop table_name. You can run the DROP TABLE if exists table_name command on any CN.