[ 
https://issues.apache.org/jira/browse/TRAFODION-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15927345#comment-15927345
 ] 

ASF GitHub Bot commented on TRAFODION-2522:
-------------------------------------------

Github user liuyu000 commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1001#discussion_r106326514
  
    --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc ---
    @@ -7784,6 +7784,120 @@ SELECT (SELECT a FROM t1) FROM t GROUP BY (SELECT a 
FROM t1);
     SELECT a+1 FROM t GROUP BY 1+a;
     ```
     
    +=======
    +[[with_clause_syntax]]
    +=== Syntax Description of WITH clause
    +
    +WITH clause, known as Common Table Expressions (CTEs) or subquery 
factoring clause, was introduced in the SQL-99 standard and has been 
implemented into Trafodion R2.1.
    +
    +For a complex expression which is referenced multiple times within the 
body of a SELECT statement, the WITH clause assigns it an alias. The alias is 
treated like a temporary table or an inline view that lasts only for the 
duration of the query and can be referenced various times in the same query.
    +
    +By abstracting the complicated parts of the query into simpler, separate 
and logical blocks, and materializing the results of these parts to avoid 
recomputing it multiple times, the WITH clause has following advantages:
    --- End diff --
    
    Got, thanks Dave. :)


> Add WITH Clause
> ---------------
>
>                 Key: TRAFODION-2522
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2522
>             Project: Apache Trafodion
>          Issue Type: Documentation
>            Reporter: Liu Yu
>            Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to