15.10 - DEFAULT JOURNAL TABLE - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

The current journal table or removes its status as the default for the specified user.

table_name
Name of table.
database_name
Containing database.

Example: Modifying the Default Journal Table For a User

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; 

Example: Changing the Default Journal Table

If the current journal table does not reside in the hierarchy beneath the user being modified, the following request could be used to change the default journal table from fincopy to jrnl1.

     MODIFY USER peterson AS 
     DEFAULT JOURNAL TABLE = jrnl1;