17.10 - Example: Modifying Default Journal Table for User - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

Two MODIFY requests are needed to change the default journal table if it resides in the user being modified.

For example, suppose the journal table fincopy is contained by user jones. To change the default journal table from fincopy to jrnl1, the present default journal table must be dropped and then a new journal table must be created.

The first request removes fincopy as the default and drops it from the system. If there are any existing tables that use it as their journal table, the request returns an error.

     MODIFY USER jones AS 
     DROP DEFAULT JOURNAL TABLE;

After the current journal table has been dropped, the second request creates a new default journal table.

     MODIFY USER jones AS 
     DEFAULT JOURNAL TABLE = jrnl1;