云数据库 GAUSSDB-返回集合的函数:序列号生成函数

时间:2023-11-15 14:50:12

序列号生成函数

  • generate_series(start, stop)

    描述:生成一个数值序列,从start到stop,步长为1。

    参数类型:int、bigint、numeric

    返回值类型:setof int、setof bigint、setof numeric(与参数类型相同)

  • generate_series(start, stop, step)

    描述:生成一个数值序列,从start到stop,步长为step。

    参数类型:int、bigint、numeric

    返回值类型:setof int、setof bigint、setof numeric(与参数类型相同)

  • generate_series(start, stop, step interval)

    描述:生成一个数值序列,从start到stop,步长为step。

    参数类型:timestamp或timestamp with time zone

    返回值类型:setof timestamp或setof timestamp with time zone(与参数类型相同)

support.huaweicloud.com/distributed-devg-v2-gaussdb/gaussdb_v5r2c10_0360.html