The other thing to note about this is the "CACHE 20", what Oracle does is
it will grab 20 numbers, assign those, then it will grab 20 more. If
you've used 1 of those sequence numbers and you restart, it will lose the
remaining 19. Not a big deal, but some people don't like to have gaps in
the numbering sequence. I believe the reason behind this is performance,
so it depends on your environment, it may or may not be an issue.
CREATE SEQUENCE WTCHANGEORDERID_SEQ
START WITH 50000
MAXVALUE 99999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;
> Oops, typo:
>
> CREATE SEQUENCE WTCHANGEORDERID_SEQ
>
> START WITH 50000
>
> MAXVALUE 99999
>
> MINVALUE 1
>
> NOCYCLE
>
> CACHE 20
>
> NOORDER;
>
>
>
>
>