numbers

description

Table-Value-Function, generate a temporary table with only one column named ‘number’, row values are [0,n).

This function is used in FROM clauses.

grammar:

  1. FROM numbers(n[,m]);

parameter:

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

example

  1. mysql> select * from numbers("5");
  2. +--------+
  3. | number |
  4. +--------+
  5. | 0 |
  6. | 1 |
  7. | 2 |
  8. | 3 |
  9. | 4 |
  10. | 5 |
  11. | 6 |
  12. | 7 |
  13. | 8 |
  14. | 9 |
  15. +--------+

keywords

  1. numbers