List:General Discussion« Previous MessageNext Message »
From:V. M. Brasseur Date:August 23 2004 8:24pm
Subject:Re: How to Reset a field
View as plain text  
You could also have done this:

TRUNCATE TABLE usarios;

That will drop the table completely and then recreate it anew (and 
empty).  It will give you a fresh start.

--V

Victor Pendleton wrote:
> Try
> alter table usuarios auto_increment = 1;
> 
> -----Original Message-----
> From: Yusdaniel Rodriguez Espinosa
> To: mysql@stripped
> Sent: 8/23/04 9:15 AM
> Subject: How to Reset a field
> 
> Hello
> 
> I have a db with table "usuarios" I erased all data in this table but
> "Id"
> is a autoinc and he have the value of the last value.
> 
> How I can Reset the field "ID"
> 
> thanks
> -------------------------------
> Hola
> 
> Yo tengo una db con una tabla usuarios, yo borre todos  los campos de la
> db
> pero el campo "id" que un autonumerico que se incrementa automaticamente
> se
> queda con el valor del ultimo campo, como puedo restablecer el valor de
> Id a
> 0 cada vez que limpie la db???
> 
> gracias
> 
> Yusdaniel
> 
> 
Thread
Re-installing db/tables from dumpfileJoseph E. Maxwell21 Aug
  • Re: Re-installing db/tables from dumpfileEgor Egorov23 Aug
  • How to Reset a fieldYusdaniel Rodriguez Espinosa23 Aug
    • Re: How to Reset a fieldEgor Egorov25 Aug
RE: How to Reset a fieldVictor Pendleton23 Aug
  • Re: How to Reset a fieldV. M. Brasseur23 Aug
  • Re: How to Reset a fieldEWA Goodson-Wickes23 Aug