22

Could you tell me what is the maximum/minimum value of MAXVALUE in a sequence & what is the minimum/maximum value of MINVALUE in sequence?

Ben
  • 51,770
  • 36
  • 127
  • 149
user1252398
  • 1,069
  • 7
  • 22
  • 29

3 Answers3

21

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

MAXVALUE Specify 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.

MINVALUE Specify 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.

 CREATE SEQUENCE supplier_seq
 MINVALUE 1
 MAXVALUE 999999999999999999999999999
 INCREMENT BY 1;
Vishwanath Dalvi
  • 35,388
  • 41
  • 123
  • 155
8

Max value is limited to 28-digits only.

Kundan Kumar
  • 81
  • 1
  • 1
6

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

CREATE SEQUENCE seq_name MINVALUE 1 NOMAXVALUE INCREMENT BY 1;

This will end up creating seq with

MIN_VALUE 1 MAX_VALUE 9999999999999999999999999999

Kannan Msk
  • 157
  • 1
  • 6