When Fully Qualified Names Are Required - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

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 logon user database for a volatile table by that name.

The search must find the table name in only one of those databases. The system 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:

database_name.table_name