即使在数据库连接关闭后,序列仍然在SQL中保持活动状态吗? [英] Does a sequence remain active in SQL even after the database connection is closed?

查看:150
本文介绍了即使在数据库连接关闭后,序列仍然在SQL中保持活动状态吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开展一个项目,我正在创建一个生成自动ID的序列。我想知道在数据库连接终止后,序列号是否仍然有效,即下一个连接中生成的序列号是否从我们离开的位置开始?



提前致谢!!!

Hi,
I am working on a project wherein i am working to create a sequence to generate a auto-ID. I wanted to know if after the database connection is terminated, does the sequence number remain active, i.e will the sequence number generated in the next connection start from where we had left ?

Thanks in advance!!!

推荐答案

序列保持活动直到它们掉线.if:Seq_name .NextVal()是-120



这个值一直有效,直到它们掉线。
Sequence remains active till they dropped.if : Seq_name .NextVal() is -120

this value remains active till they dropped.


这篇关于即使在数据库连接关闭后,序列仍然在SQL中保持活动状态吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆