SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast drorit30's Avatar
    Join Date
    May 2003
    Location
    tel aviv
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL variable type

    Hi all,

    I need to create a table in SQL server. One of the colums is an ID which I would like to be an auto-number. I saw that I can create an INTERGER which increments automatically. However I noticed that the size of the INTEGER was 4 digits. What if the number of entries exceed 9999?

    Basically what I need is the variable type which is the same as
    AUTO-NUMBER (Long Integer) in MS ACCESS.

    Thanks in advance,
    Dror

  2. #2
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    700
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    The size is 4 bytes, not 4 digits. Maximum value is about 2 billions not 9999.

  3. #3
    SitePoint Enthusiast drorit30's Avatar
    Join Date
    May 2003
    Location
    tel aviv
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK Thanks


Bookmarks

Posting Permissions

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