Postgresql - Functions and Operators 函数和运算 - Sequence Manipulation

对序列的操作

Function

Return Type

Description

currval(regclass)

bigint

最近使用NEXVALL获得的返回值为指定序列

lastval()

bigint

查询最近使用nextval获得返回的序列的值。

nextval(regclass)

bigint

序列的下一个值

setval(regclass, bigint)

bigint

设置序列当前值

setval(regclass, bigint, boolean)

bigint

Set sequence's current value and is_called flag

猜你喜欢

转载自blog.csdn.net/chuckchen1222/article/details/81454574