Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-3769

document common table expression

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • Mad Hatter
    • Mad Hatter
    • query
    • None
    • 1

    Description

      We have added common table expression to the N1QL grammar.

      Common Table Expression allows to assign an expression to a variable for subsequent use in a select statement. Sort of like LET, but prior to the select, and not after FROM.

      Looks like this:

      WITH <variable name> AS
      (
      any expression or select statement
      ) [, <variable name> AS (....)]
      SELECT ... variable ....

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              simon.dew Simon Dew
              marco.greco Marco Greco (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty