postgres - comparing two arrays

后端 未结 2 530
情书的邮戳
情书的邮戳 2021-01-01 12:58

postgres has an array data type, in this case a numeric array:

CREATE TABLE sal_emp (name text, pay_by_quarter integer[]);
INSERT INTO sal_emp VALUES (\'one\         


        
2条回答
  •  無奈伤痛
    2021-01-01 13:37

    figured it ... there's an && operator

    http://www.postgresql.org/docs/8.2/static/functions-array.html

    "&& overlap (have elements in common) ARRAY[1,4,3] && ARRAY[2,1]"

提交回复
热议问题