In general, common table expressions are useful whenever a table expression must appear multiple times within a single query. The following typical situations are suited to common table expressions.
Queries that involve multiple aggregate functions.
Views within a procedure that must contain a reference to a program variable.
Queries that use temporary views to store a set of values.
This list is not exhaustive; you may encounter many other situations in which common table expressions are useful.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|