SQL Statement Syntax - Teradata Vantage - Analytics Database

Database Introduction

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-09-27
dita:mapPath
gtm1628096154303.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dsm1472253642401
lifecycle
latest
Product Category
Teradata Vantage™

A typical SQL request consists of the following:

  • Statement keyword
  • One or more column names
  • Database name
  • Table name
  • One or more optional clauses introduced by keywords

For example, in the following single-statement request, the statement keyword is SELECT:

   SELECT deptno, name, salary
   FROM personnel.employee
   WHERE deptno IN(100, 500)
   ORDER BY deptno, name
   ;

The select list and FROM clause for this statement is made up of the following names:

  • Deptno, name, and salary (column names)
  • Personnel (database name)
  • Employee (table name)

The search condition, or WHERE clause, is introduced by the keyword WHERE. For example:

WHERE deptno IN(100, 500)

The sort ordering, or ORDER BY clause, is introduced by the keywords ORDER BY. For example:

ORDER BY deptno, name