Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
移除数组中的重复元素。
ARRAY_DISTINCT(array)
array
mysql> select * from test; +------+---------------+ | c1 | c2 | +------+---------------+ | 1 | [1,1,2] | | 2 | [1,null,null] | | 3 | NULL | | 4 | [null] | +------+---------------+
c2
mysql> select c1, array_distinct(c2) from test; +------+----------------------+ | c1 | array_distinct(`c2`) | +------+----------------------+ | 1 | [2,1] | | 2 | [null,1] | | 3 | NULL | | 4 | [null] | +------+----------------------+