16.10 - Common Table Expression Enhancements - Teradata Database

Teradata Database Release Summary

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Release Notes
featnum
B035-1098-161K

You can use a nonrecursive WITH clause to define one or more common table expressions (CTEs) in derived table and view definitions. CTEs are also referred to as named queries.

Previously, when a nonrecursive WITH clause defined multiple CTEs, a CTE could only reference a subsequent CTE in the WITH clause. Now, a CTE can reference a preceding or subsequent CTE in the WITH clause.

Benefits

CREATE VIEW statements and derived table definitions can include a nonrecursive WITH clause with backward and forward CTE references.

Considerations

A CTE cannot indirectly reference itself, that is, circular references are not allowed.

Additional Information

For more information on using CTEs, see:
  • SQL DDL Syntax and Examples
  • SQL DML