DO
BEGIN
DECLARE arr1 TINYINT ARRAY = ARRAY(1,2,3,4);
DECLARE arr2 INTEGER ARRAY = ARRAY(1,2);
--convert array in table rst1 with column name col1
rst1 = UNNEST(:arr1) as (COL1);
--convert array in table rst2 with column name col1
rst2 = UNNEST(:arr2) as (COL1);
--query with minus
select col1 from :rst1
minus
select col1 from :rst2;
END;
1条答案
按热度按时间9rbhqvlz1#
我可以用以下方法解决这个问题: