What is the SQL statement to unnest both columns containing arrays while preserving the array order?
| col1 | col2 |
| ------------ | ------------ |
| [1,2,3,4] | [1,2,3,4] |
Expected Result
| col1 | col2 |
| ------------ | ------------ |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
1条答案
按热度按时间oknrviil1#
像这样使用
CROSS APPLY STRING_SPLIT
函数enter link description here