16.20 - When Fully Qualified Names Are Required - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
English (United States)

Using unqualified names is easiest when the default database is the only database referred to by an SQL statement. When an SQL statement references tables, views, or other objects from more than one database, unqualified names can apply to only one of those databases.

When encountering an unqualified table name, the system looks for an object by that name in all of the following databases:

  • The default database.
  • Any databases referenced by the SQL statement.
  • The login user database for a volatile table by that name.

The search must find the table name in only one of those databases. Teradata Database returns the “ambiguous table name” error message if the table name exists in more than one of those databases. The default database does not receive priority over any other database.

Therefore, if you reference more than one database, you must use the fully qualified form for names that are contained in more than one of the databases.

The following syntax shows the fully-qualified form referencing, for example, a table: