Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Do Sequences automatically increment by 1?

If I leave out the "INCREMENT BY" in a sequence, does it automatically just increment by one? I am realizing I checked in code to start a sequence and left out the "INCREMENT BY" statement. However, once I view the sequence in my schema, It shows the sequence is set to incrementing by 1. Just trying to figure out if I need to check out that code and make changes or is it fine.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

As documentation says:

INCREMENT BY
Specify the interval between sequence numbers. This
integer value can be any positive or negative integer, but it cannot
be 0. This value can have 28 or fewer digits for an ascending sequence
and 27 or fewer digits for a descending sequence. The absolute of this
value must be less than the difference of MAXVALUE and MINVALUE. If
this value is negative, then the sequence descends. If the value is
positive, then the sequence ascends. If you omit this clause, then
the interval defaults to 1.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading