建站公司兴田德润实惠,网站开发期末作品代码和数据库运行好大全,北京医疗网站建设公司排名,rar在线解压网站功能介绍
Oracle数据库在创建sequence的时候可以支持设置maxvalue 为9999999999999999999999999999#xff0c;这样的SQL在LightDB23.3版本之前都是执行失败的。为了方便Oracle用户迁移到LightDB上#xff0c;在LightDB23.3版本上#xff0c;增加了sequence支持maxvalue设置…功能介绍
Oracle数据库在创建sequence的时候可以支持设置maxvalue 为9999999999999999999999999999这样的SQL在LightDB23.3版本之前都是执行失败的。为了方便Oracle用户迁移到LightDB上在LightDB23.3版本上增加了sequence支持maxvalue设置为9999999999999999999999999999的语法兼容。 如果设置的maxvalue的值大于INT64_MAX9223372036854775807则设置maxvalue为sequence类型所对应的最大值。
使用说明
创建sequence时设置maxvalue为9999999999999999999999999999
lightdblt_test# create sequence s1 maxvalue 9999999999999999999999999999;
CREATE SEQUENCE
lightdblt_test# \d s1Sequence public.s1Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
------------------------------------------------------------------------bigint | 1 | 1 | 9223372036854775807 | 1 | no | 1lightdblt_test# 修改sequence时设置maxvalue为9999999999999999999999999999
lightdblt_test# create sequence s2 maxvalue 100000;
CREATE SEQUENCE
lightdblt_test# \d s2Sequence public.s2Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
------------------------------------------------------------bigint | 1 | 1 | 100000 | 1 | no | 1lightdblt_test#
lightdblt_test# alter sequence s2 maxvalue 9999999999999999999999999999;
ALTER SEQUENCE
lightdblt_test# \d s2Sequence public.s2Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
------------------------------------------------------------------------bigint | 1 | 1 | 9223372036854775807 | 1 | no | 1lightdblt_test# 当sequence类型为smallint时设置maxvalue为9999999999999999999999999999
lightdblt_test# create sequence s3 as smallint maxvalue 1000;
CREATE SEQUENCE
lightdblt_test# \d s3Sequence public.s3Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
--------------------------------------------------------------smallint | 1 | 1 | 1000 | 1 | no | 1lightdblt_test# alter sequence s3 maxvalue 9999999999999999999999999999;
ALTER SEQUENCE
lightdblt_test# \d s3Sequence public.s3Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
--------------------------------------------------------------smallint | 1 | 1 | 32767 | 1 | no | 1lightdblt_test#