XMLWordPrintableJSON

Details

    Description

      Returns the substring of expr before count occurrences of the delimiter delim.

      Syntax:

      substring_index(expr, delim, count)

      Arguments:

      • expr: A STRING or BINARY expression.
      • delim: An expression matching the type of expr specifying the delimiter.
      • count: An INTEGER expression to count the delimiters.

      Returns:

      The result matches the type of expr.

      If count is positive, everything to the left of the final delimiter (counting from the left) is returned.

      If count is negative, everything to the right of the final delimiter (counting from the right) is returned.

      Examples:

      > SELECT substring_index('www.apache.org', '.', 2);
       www.apache 

      See more:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lsy dalongliu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: