Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Sybase AutoNumber/Identity Column Resetting

Sybase AutoNumber/Identity Column Resetting

Scheduled Pinned Locked Moved Database
databasesysadminquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mobius111001
    wrote on last edited by
    #1

    I've never seen this before. I'm working on a database where the AutoNumber/Identity ID column is being reset when the given table has no data in it and the Sybase Server (SQL Anywhere v7 to be exact) is restarted. Anyone have any advise as to why this is happening and how it can be corrected? Thank you in advance and happy holidays to all.

    W 1 Reply Last reply
    0
    • M mobius111001

      I've never seen this before. I'm working on a database where the AutoNumber/Identity ID column is being reset when the given table has no data in it and the Sybase Server (SQL Anywhere v7 to be exact) is restarted. Anyone have any advise as to why this is happening and how it can be corrected? Thank you in advance and happy holidays to all.

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Are you doing TRUNCATE on the table? That could be one reason. "If the table contains a column defined as DEFAULT AUTOINCREMENT or DEFAULT GLOBAL AUTOINCREMENT, TRUNCATE TABLE resets the next available value for the column" Refer to: TRUNCATE TABLE statement [^]

      The need to optimize rises from a bad design.My articles[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups