Questions tagged «set-returning-functions»

5
PostgreSQL unnest(),元素编号
当我有一个带有单独值的列时,可以使用以下unnest()函数: myTable id | elements ---+------------ 1 |ab,cd,efg,hi 2 |jk,lm,no,pq 3 |rstuv,wxyz select id, unnest(string_to_array(elements, ',')) AS elem from myTable id | elem ---+----- 1 | ab 1 | cd 1 | efg 1 | hi 2 | jk ... 如何包含元素编号?即: id | elem | nr ---+------+--- 1 | ab …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.