宁波网站建设设计报告,网站建设内容规划表,seo网站培训,wordpress oa插件功能介绍
Oracle数据库在创建sequence的时候可以支持设置nomaxvalue#xff0c;这样的SQL在LightDB 23.3版本之前都是执行失败的。为了方便Oracle用户迁移到LightDB上#xff0c;在LightDB 23.3版本上#xff0c;增加了sequence支持设置nomaxvalue的语法兼容。 nomaxvalue内…功能介绍
Oracle数据库在创建sequence的时候可以支持设置nomaxvalue这样的SQL在LightDB 23.3版本之前都是执行失败的。为了方便Oracle用户迁移到LightDB上在LightDB 23.3版本上增加了sequence支持设置nomaxvalue的语法兼容。 nomaxvalue内部逻辑和PostgreSQL数据库sequence原本就支持的NO MAXVALUE相同。
使用说明
创建sequence时指定nomaxvalue
lightdblt_test# create sequence s1 nomaxvalue;
CREATE SEQUENCE
lightdblt_test# \d s1Sequence public.s1Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
------------------------------------------------------------------------bigint | 1 | 1 | 9223372036854775807 | 1 | no | 1lightdblt_test# 修改sequence时指定nomaxvalue
lightdblt_test# alter sequence s1 maxvalue 100000;
ALTER SEQUENCE
lightdblt_test# \d s1Sequence public.s1Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
------------------------------------------------------------bigint | 1 | 1 | 100000 | 1 | no | 1lightdblt_test# alter sequence s1 nomaxvalue;
ALTER SEQUENCE
lightdblt_test# \d s1Sequence public.s1Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
------------------------------------------------------------------------bigint | 1 | 1 | 9223372036854775807 | 1 | no | 1lightdblt_test# nomaxvalue不可以和no maxvalue或者maxvalue一起使用
lightdblt_test# alter sequence s1 maxvalue 10000 nomaxvalue;
ERROR: conflicting or redundant options
LINE 1: alter sequence s1 maxvalue 10000 nomaxvalue;^
lightdblt_test# alter sequence s1 no maxvalue nomaxvalue;
ERROR: conflicting or redundant options
LINE 1: alter sequence s1 no maxvalue nomaxvalue;^
lightdblt_test#