gpt4 book ai didi

postgresql - 如何在不破坏数组的情况下执行此查询?

转载 作者:行者123 更新时间:2023-11-29 12:00:57 25 4
gpt4 key购买 nike

我可以执行这样的查询吗?如果没有,你能给我一个更好的方法来做到这一点,而不用遍历我的阵列或破坏它吗?

    ....
DECLARE
examples example[];
myinput myinput[];
BEGIN
select array(select e from mytable e where row_id in (myinput)) into examples
...

最佳答案

SELECT  e
FROM mytable e
WHERE row_id = ANY(myinput)

关于postgresql - 如何在不破坏数组的情况下执行此查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10653412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com