Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Posts
    2

    Unanswered: Sybase ASA 9 - autoincrement columns and constraints

    Dear All,

    this is my first post, I appreciate already this forum for some answers that I have already found without registering, but now I have a question which I didn't find in other posts.

    I would like to know which is the max value that an autoincrement column could reach before throwing an exception. Or will the column never reach a maximum value?

    Additionally is there any needs to create a constraint to the autoincrement column similar to check(@col < 2147483647)?

    Thank you in advance for your help.

    tagliolone

  2. #2
    Join Date
    Jul 2007
    Posts
    6
    In SQL Anywhere, AUTOINCREMENT values are maintained as signed 64-bit integers. If you exceed the maximum, you will get an SQL error. There is no need to use a check constraint for the autoincrement value.

  3. #3
    Join Date
    Dec 2008
    Posts
    2
    Quote Originally Posted by jlahc
    In SQL Anywhere, AUTOINCREMENT values are maintained as signed 64-bit integers. If you exceed the maximum, you will get an SQL error. There is no need to use a check constraint for the autoincrement value.
    Thank you Jlahc, this is what I was expecting, I did have some discussions with collegaues about that.

    Tagliolone

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •