Help Center/ GaussDB(DWS)/ Troubleshooting/ Database Use/ cannot drop table test because other objects depend on it Is Displayed When a Table Is Deleted
Updated on 2025-04-10 GMT+08:00

cannot drop table test because other objects depend on it Is Displayed When a Table Is Deleted

Symptom

Error cannot drop table test because other objects depend on it is displayed when a table is deleted, as shown in the following figure.

Possible Causes

After table t1 is created, a sequence is implicitly created. When table t2 is created, the sequence is referenced. When the t1 table is deleted, the sequence is deleted in cascading mode. However, the sequence is depended on by other objects. As a result, the error is reported.

Handling Procedure

If t2 does not need to be retained, you can delete the sequence using DROP CASCADE.

If you want to retain table t2 and the sequence, you can delete it using the method shown in the following figure.