Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drop/ Delete Database in Teradata

Tags:

teradata

Please help with direction on how to drop a database in Teradata.
When I run the command DROP DATABASE database_name, I get the error message:

*** Failure 3552 Cannot DROP databases with tables, journal tables, 
views, macros, or zones.
            Statement# 1, Info =0
*** Total elapsed time was 1 second.
like image 354
Ekaba Bisong Avatar asked Apr 06 '26 15:04

Ekaba Bisong


1 Answers

You need to run this command first to delete all of the objects in the database:

DELETE DATABASE database_name;

In order to drop a database with journal tables:

MODIFY DATABASE database_name AS DROP DEFAULT JOURNAL TABLE;

Then run,

DROP DATABASE database_name

to delete the database in Teradata

like image 151
ck1 Avatar answered Apr 17 '26 10:04

ck1



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!