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. resetting id while deleting records in runtime

resetting id while deleting records in runtime

Scheduled Pinned Locked Moved Database
databasetoolsquestion
2 Posts 2 Posters 1 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.
  • G Offline
    G Offline
    ginola
    wrote on last edited by
    #1

    after i had delete the records by the following line: objConnection.execute "DELETE * FROM tea_session_list" what should i add to the statement to have the autonumber id also being resetted to be start at 1. i dun wan to do it by compacting database...can i do it in a new script with the delete statement....what should i add to my above statement???

    P 1 Reply Last reply
    0
    • G ginola

      after i had delete the records by the following line: objConnection.execute "DELETE * FROM tea_session_list" what should i add to the statement to have the autonumber id also being resetted to be start at 1. i dun wan to do it by compacting database...can i do it in a new script with the delete statement....what should i add to my above statement???

      P Offline
      P Offline
      Peter Zajac
      wrote on last edited by
      #2

      The only resonable solution to this I see is if you control the ID yourself. Either use a MAX value or a second table that stores the next ID value.

      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