XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.16.0
    • Table SQL / API
    • None

    Description

      Returns true if array contains value.

      Syntax:

      array_contains(array, value) 

      Arguments:

      • array: An ARRAY to be searched.
      • value: An expression with a type sharing a least common type with the array elements.

      Returns:

      A BOOLEAN. If value is NULL, the result is NULL. If any element in array is NULL, the result is NULL if value is not matched to any other element.

      Examples:

      > SELECT array_contains(array(1, 2, 3), 2);
       true
      > SELECT array_contains(array(1, NULL, 3), 2);
       NULL
      > SELECT array_conatins(array(1, 2, 3), NULL);
       NULL 

      See more:

      Attachments

        Activity

          People

            twalthr Timo Walther
            lsy dalongliu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: