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

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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;