SELECT Statement | Data Manipulation Language | VantageCloud Lake - SELECT - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Returns specific row data in the form of a result table.

Virtual columns can appear anywhere in a SELECT statement.

Teradata Vantageā„¢ uses WHERE clause conditions on actual or virtual partition columns to optimize path filters. Elsewhere in the query, Vantage treats actual partition columns as table columns.

For definitions of actual column and virtual column, see CREATE FOREIGN TABLE Syntax Elements.

ANSI Compliance

SELECT is ANSI SQL:2011-compliant with extensions.

In Teradata SQL, the FROM clause is optional. This is a Teradata extension to the ANSI SQL:2011 standard, in which a FROM clause is required.

The WITH, SAMPLE, QUALIFY, and TOP clauses are Teradata extensions to the ANSI SQL:2011 standard.

The documented syntax specifies the ANSI SQL:2011 ordering of these clauses: FROM, WHERE, GROUP BY, HAVING, and ORDER BY. The database does not enforce this ordering, but observe it when you write applications to maintain ANSI compliance.

Required Privileges

To select data from a table, you must have the SELECT privilege on the table or column set being retrieved.

To select data through a view, you must have the SELECT privilege on that view. Also, the immediate owner of the view (that is, the database or user in which the view resides) must have SELECT WITH GRANT OPTION privileges on all tables or views referenced in the view.

If indirect references are made to a table or view, the privileges must be held by the immediate owner of the object being accessed rather than the user running the query.

For information about granting the SELECT privilege, see GRANT (SQL Form). For general information about granting privileges, see Using Roles to Manage User Privileges.