Db2 Sequence Object - Largest Value For Maxvalue Parameter

   

  Asked by Anonymous - Db2 Sequence Object - Largest Value For Maxvalue Parameter :
I am setting up a new db2 sequence object on the mainframe (z/os).  What is the largest value that I can enter for the maxvalue parm when I am defining this?  I see alot of info on defaults and things like that, but I dont see anywhere that talks much about the largest value to put there.  thanks in advance

Anonymous Says:
I should have included an example, so here is my sequence object syntax for creating it.

CREATE SEQUENCE MYNAME
START WITH 1
INCREMENT BY 1
MINVALUE 1
MAXVALUE  ?????????
NO CYCLE
NO CACHE

I want maxvalue to be the largest number possible.

Joe Says:
You took the seq object default which I think it integer.  You dont have to use that, you can put in "as integer" or "as bigint" etc.  

If you use smallint then the largest value is 32767 (32K), if you use integer then the largest value is 2147483647 (2.1B), but if you use bigint then you have a whopping large number.  I dont even know how to describe a number that big but it would be 9 with 18 digits after it, so something like 9000000000000000000.  

Add your reply below ...


Your Nickname:

Your Reply:

Type the code: