#openGauss #入门 #安装 #数据库 #开源
知识来源:docs-opengauss.osinfra.cn/zh/
-
next(idx)
参数:idx为int类型或varchar类型
返回值:int类型或varchar类型
功能描述:返回集合中当前下标的后一个有效元素下标。
示例:
openGauss=# declare openGauss-# type nest is table of int; openGauss-# aa nest:=nest(11,22,33,44,55); openGauss-# begin openGauss$# raise info 'next:%' ,aa.next(3); openGauss$# end; openGauss$# / INFO: next:4 ANONYMOUS BLOCK EXECUTE openGauss=# declare openGauss-# type nest is table of int index by varchar; openGauss-# aa nest; openGauss-# begin openGauss$# aa('aaa') := 111; openGauss$# aa('bbb') := 222; openGauss$# aa('ccc') := 333; openGauss$# raise info 'next:%' ,aa.next('bbb'); openGauss$# end; openGauss$# / INFO: next:ccc ANONYMOUS BLOCK EXECUTE
#openGauss #入门 #安装 #数据库 #开源