SQL oracle中按顺序MAXVALUE的最大值是多少?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9595876/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 14:42:20  来源:igfitidea点击:

what is the maximum value of MAXVALUE in sequence in oracle?

sqloracleoracle10gsequence

提问by user1252398

Could you tell me what is the maximum/minimum value of MAXVALUEin a sequence & what is the minimum/maximum value of MINVALUEin sequence?

你能告诉我MAXVALUE序列中的最大值/最小值是MINVALUE多少,序列中的最小值/最大值是多少?

回答by mr_eclair

http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_6015.htm

http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_6015.htm

MAXVALUESpecify the maximum value the sequence can generate. This integer value can have 28 or fewer digits. MAXVALUE must be equal to or greater than START WITH and must be greater than MINVALUE.

MAXVALUE指定maximum value the sequence can generate. 这个整数值可以有28 or fewer digits. MAXVALUE 必须等于或大于 START WITH 并且必须大于 MINVALUE。

MINVALUESpecify the minimum value of the sequence. This integer value can have 28 or fewer digits. MINVALUE must be less than or equal to START WITH and must be less than MAXVALUE.

MINVALUE指定minimum value of the sequence. 此整数值可以有 28 位或更少的数字。MINVALUE 必须小于或等于 START WITH 并且必须小于 MAXVALUE。

 CREATE SEQUENCE supplier_seq
 MINVALUE 1
 MAXVALUE 999999999999999999999999999
 INCREMENT BY 1;

回答by Kundan Kumar

Max value is limited to 28-digits only.

最大值仅限于 28 位。

回答by Kannan Msk

You don't have to mention any value for MAX Value while creating seq.

在创建 seq 时,您不必提及 MAX Value 的任何值。

CREATE SEQUENCE seq_name MINVALUE 1 NOMAXVALUE INCREMENT BY 1;

This will end up creating seq with

这将最终创建 seq

MIN_VALUE 1 MAX_VALUE 9999999999999999999999999999

MIN_VALUE 1 MAX_VALUE 9999999999999999999999999999