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. Identity reset

Identity reset

Scheduled Pinned Locked Moved Database
databasetutorial
3 Posts 3 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.
  • F Offline
    F Offline
    FireOnMoon
    wrote on last edited by
    #1

    How to reset a database's identity value to 0, after deleting all rows from a table.

    FIRE

    _ C 2 Replies Last reply
    0
    • F FireOnMoon

      How to reset a database's identity value to 0, after deleting all rows from a table.

      FIRE

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      I don't know the exact way but one workaround is there. You change that column identity to no and again reset it to yes, next time it will start from one. :)

      Best Regards, Apurva Kaushal

      1 Reply Last reply
      0
      • F FireOnMoon

        How to reset a database's identity value to 0, after deleting all rows from a table.

        FIRE

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        I refer you to the answer I gave some time ago[^]


        Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

        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