Inicio > Base de Datos, MySql, Oracle, Sql > Modificar el AUTO_INCREMENT


Cuando estamos programando y realizando varias pruebas de nuestro programa solemos crear datos de prueba. Muchas veces cuando el producto que hemos desarrollado esta acabado y probado nos disponeos a vaciar los datos de prueba. Una vez terminado nuestro programa observamos que los identificadores que quedaron en nuestras tablas parten de números elevados.

Los identificadores tienen los que se denomina Autoincrementables, son un tipo de dato en SQL que va aumentando automáticamente en cada creación (INSERT) para ello una vez finalizado nuestro proyecto será necesario resetear los IDentificadores.  Si no tenemos registros los inializaremos a uno sino tenemos dos opciones, modificar los id de los datos que se han de mantener y inicializar la variable en el siguiente numero, o simplemente resetearla hasta el último valor valido en nuestra Base de Datos.

Para ello escribiremos el siguiente comando:



Observamos que el auto incremento en Oracle se hace a travez de secuencias en las que iniciamos en su creación START WITH y seteamos en el Alter RESTART





  1. 19 agosto 2019 de 10:13

    Hi, i think that i noticed you visited my web site thus i came to go back
    the favor?.I’m trying to to find issues to enhance my
    web site!I guess its adequate to make use of a few of your ideas!!

  2. 14 agosto 2018 de 20:21

    You need to put separate amount on both and not summarize interior and
    exterior to produce a total minimum bet. Though the lobby seems cluttered
    with buttons and banners, you can easily use as soon as you get a hang of it.
    Finally, when playing scratch cards or another casino game, it is important to allocate
    your financial allowance in a way that you simply at the end you may not be left with no cash at all.

  3. 4 abril 2018 de 03:51

    Thank you for sharing with us, I think this website genuinely stands
    out :D.

  4. 11 marzo 2018 de 07:17

    An outstanding share! I have just forwarded this onto a coworker who had been conducting a little homework on this.

    And he in fact bought me breakfast due to
    the fact that I discovered it for him… lol. So let me reword this….
    Thank YOU for the meal!! But yeah, thanks for spending time to discuss this subject here on your web site.

  5. 26 octubre 2017 de 13:21

    magnificent issues altogether, you simply gained a logo new reader.
    What may you suggest in regards to your publish that you
    simply made a few days ago? Any sure?

  6. 26 agosto 2017 de 17:49

    Aw, this was a really nice post. Spending some
    time and actual effort to create a good article… but what can I
    say… I hesitate a whole lot and don’t seem to get nearly
    anything done.

  7. 24 marzo 2017 de 09:34

    I tend not to drop a ton of comments, but i did a few searching and wound
    up here Modificar el AUTO_INCREMENT | Salinasjavi's Blog.

    And I actually do have a couple of questions for you if it’s allright.
    Is it just me or does it look like some of the comments look like written by brain dead individuals?
    😛 And, if you are writing at additional places, I’d like to keep up with everything fresh you
    have to post. Could you make a list of all of all your community sites like your linkedin profile, Facebook page or twitter feed?

  8. 14 febrero 2017 de 11:10

    Excellent article! We are linking to this particularly
    great article on our website. Keep up the great writing.

  9. 14 junio 2013 de 12:10

    Like any game, when we stay within the rules, we score, and when we play outside the
    rules there of course is a penalty. Aside from the obvious difficulties of pitching so
    brilliantly in such a high pressure situation, Larsen’s feat is even more impressive when one considers that the Dodgers had four future Hall of Famers in their lineup: Duke Snider, Jackie Robinson, Roy Campanella and Pee Wee Reese. For the purposes of this game, a “set” is at least three cards of equal value such as three Jacks or three fours and a “sequence” is made up of at least four cards that are of the same suit and run sequentially such as three, four, five, and six of spades.

  10. 24 mayo 2013 de 23:44

    free ipad

    I blog frequently and I really thank you for your information.
    This article has truly peaked my interest. I am going to take a note of your blog and
    keep checking for new information about once per
    week. I subscribed to your RSS feed too.

  11. 10 mayo 2013 de 00:56

    We absolutely love your blog and find almost all of your post’s to be just what I’m
    looking for. Would you offer guest writers to write content for you?
    I wouldn’t mind writing a post or elaborating on most of the subjects you write with regards to here. Again, awesome web site!

  12. 24 abril 2013 de 09:08

    Heya i’m for the first time here. I found this board and I in finding It really helpful & it helped me out much. I am hoping to present something again and aid others such as you aided me.

  13. 17 abril 2013 de 09:41

    I visited multiple web pages except the audio quality for audio songs present at this web site is
    truly fabulous.

  14. 11 octubre 2012 de 18:25

    Have you ever thought about writing an ebook or guest authoring on other
    blogs? I have a blog based on the same ideas you discuss and would really
    like to have you share some stories/information. I know my subscribers would value your work.
    If you are even remotely interested, feel free to shoot me
    an email.

    • 26 octubre 2012 de 10:31

      Gracias por su oferta. La finalidad de este blog es la de guardar la información que me ha sido util o he descubierto y con ello ponerlo a disposición del resto de personas. Gracias y un saludo

      Thanks for your offer. The purpose of this blog is to store the information was useful and I have discovered and thus make it available to other people. Thanks and regards

  15. jelica83
    12 junio 2012 de 10:25

    Muchas gracias! ya me estaba haciendo mucho problema y era mas facil!

  16. 25 enero 2012 de 23:06

    una idea tan simple y util. Gracias por el aporte.

  17. DASK99
    29 octubre 2009 de 13:52


    This option doesn’t exists in Oracle. Maybe you need to check this link

  1. 9 octubre 2018 de 23:04
  2. 23 agosto 2018 de 11:39
  3. 22 agosto 2018 de 11:37
  4. 31 julio 2018 de 09:11
  5. 31 julio 2018 de 08:56
  6. 20 noviembre 2017 de 17:56
  7. 10 enero 2017 de 10:43
  8. 5 enero 2017 de 13:22
  9. 5 enero 2017 de 01:28
  10. 5 enero 2017 de 00:42
  11. 4 enero 2017 de 23:39
  12. 2 enero 2017 de 00:22
  13. 1 enero 2017 de 23:43
  14. 31 diciembre 2016 de 13:49
  15. 31 diciembre 2016 de 12:20
  16. 30 diciembre 2016 de 19:07
  17. 6 octubre 2016 de 11:59
  18. 29 agosto 2015 de 15:26
  19. 24 marzo 2015 de 12:14
  20. 8 octubre 2014 de 09:27
  21. 19 agosto 2014 de 08:28
  22. 27 octubre 2009 de 17:21


Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s

A %d blogueros les gusta esto: