我有一个包含各种数组的表,如下所示:
{10574664,10574665,10574679,10574724}
{8616204,10574643,10574644,10574645,10574651,10574688,10574690,10574696,10574708}
{8616208}
{9830397}
{8616203}
{8616204,10574643,10574644,10574645,10574651,10574688,10574690,10574696,10574708}
{8616204,10574643,10574644,10574645,10574651,10574688,10574690,10574696,10574708}
{8616208}
{10574680}
{8616203}
有没有办法只撤回数组中只有一个元素的记录。 结果如下:
{8616208}
{9830397}
{8616203}
{8616208}
{10574680}
{8616203}
我的查询看起来像这样
Select * from attr_lookup where target_tcode =
帮助查询
答案 0 :(得分:2)
SELECT *
FROM attr_lookup
WHERE array_length(target_tcode, 1) = 1;