VeloDB Cloud
SQL Manual
Functions
table-functions
numbers

numbers

Description

This is a table function that generates a temporary table with only one column named number and a row value of [0,n).

It is used in FROM clauses.

Syntax:

numbers(
  "number" = "n",
  "backend_num" = "m"
  );

Parameters:

  • n: It means to generate [0, n) rows.
  • m: Optional. It means this function is executed simultaneously on m BE nodes (multiple BE nodes need to be deployed).

Example

mysql> select * from numbers("number" = "10");
+--------+
| number |
+--------+
|      0 |
|      1 |
|      2 |
|      3 |
|      4 |
|      5 |
|      6 |
|      7 |
|      8 |
|      9 |
+--------+

Keywords

numbers