0
我有一个整数类型列名为开始。我想通过这个列的值来创建一个数组。这似乎很容易,我使用array_agg(),但它是给出空数组作为输出。以下是我的列数据为什么array_agg()在postgresql中返回空数组?
start
1
2
11
5
.
.
. (and so on)
而下面是用我的查询,使阵列:
select array_agg(start) as start_array from table1;
为什么给空数组?
那真的是你的整个查询?除此之外,您还没有任何“WHERE”或其他条款? –
这应该起作用。你确定桌子里真的有数据吗? –
@GordonLinoff是的表有数据 – LSG