PostgreSQL (PG) array functions and operators

Source: Internet
Author: User
Tags postgresql

operator Description Example Results
= Equals Array[1.1,2.1,3.1]::int[] = array[1,2,3] T
<> Not equal to array[1,2,3] <> array[1,2,4] T
< Less than array[1,2,3] < array[1,2,4] T
> Greater than array[1,4,3] > array[1,2,4] T
<= Less than or equal array[1,2,3] <= array[1,2,3] T
>= Greater than or equal array[1,4,3] >= array[1,4,3] T
@> Contains array[1,4,3] @> array[3,1] T
<@ are included array[2,7] <@ array[1,7,4,2,6] T
&& Overlap (with common elements) array[1,4,3] && array[2,1] T
|| Arrays and Array strings array[1,2,3] | | array[4,5,6] {1,2,3,4,5,6}
|| Arrays and Array strings array[1,2,3] | | ARRAY[[4,5,6],[7,8,9]] {{1,2,3},{4,5,6},{7,8,9}}
|| element to array string 3 | | array[4,5,6] {3,4,5,6}
|| Array-to-element-threaded array[4,5,6] | | 7 {4,5,6,7}


This article is from a "simple to rely" blog, so be sure to keep this source http://wenxuehui.blog.51cto.com/12898974/1954880

PostgreSQL (PG) array functions and operators

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.