VeloDB Cloud
SQL Manual
Functions
table-functions
explode_numbers

explode_numbers

Description

This is a table function that is used in combination with Lateral View.

It returns a [0,n) sequence.

Syntax:

explode_numbers(n)

Example

mysql> select e1 from (select 1 k1) as t lateral view explode_numbers(5) tmp1 as e1;
+------+
| e1   |
+------+
|    0 |
|    1 |
|    2 |
|    3 |
|    4 |
+------+

Keywords

explode,numbers,explode_numbers