DATABASE - Advanced SQL Engine - Teradata Database

Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
ynh1604715438919.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1102
lifecycle
previous
Product Category
Teradata Vantageā„¢

Purpose

The DATABASE command changes the default database for the current Teradata Database session.

Syntax

DATABASE database ;
database
Name of the new default database.

Usage Notes

When you invoke dul and log onto the Teradata Database, the crashdumps database automatically becomes your default database. The Teradata Database uses the database specified in the DATABASE command as the default database until the end of the session, or until you type a subsequent DATABASE command.

To use the DATABASE command, you must have SELECT privileges on the specified database.

Example: Changing the default database

To make the Personnel database the default database for the current session, type the following:

DATABASE Personnel ;

The following appears:

*** Sending database Personnel to Teradata Database.
*** New default database accepted.