Teradata DELETE DATABASE

The DELETE DATABASE statement in Teradata is used to delete all the database objects like data tables, views, macros, triggers, store procedures, user-defined functions from a database.

To delete a database in Teradata you must have the DROP privileges on the specified database.

Teradata Delete Database Syntax

DELETE DATABASE database_name [ALL];

Here,

  1. database_name – The name of the database from which you want to remove all the objects.
  2. ALL – Optional. All is specified to delete all the objects including materialized global Temporary tables.

Teradata Delete Database Example

The following statement deletes all the objects from the UNIVERSITY database.

DELETE DATABASE UNIVERSITY;

In order to remove a database structure completely from the data dictionary, you have to use Teradata Drop Database Statement.