array_compact

array_compact

array_compact介绍

array_compact(array) - 从数组中移除空值。

Examples:

> SELECT array_compact(array(1, 2, 3, null));
 [1,2,3]
> SELECT array_compact(array("a", "b", "c"));
 ["a","b","c"]

Since: 3.4.0