Re: How to Reset a field
Yusdaniel Rodriguez Espinosa [EMAIL PROTECTED] wrote: 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 See http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html at the very end. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: How to Reset a field
Try alter table usuarios auto_increment = 1; -Original Message- From: Yusdaniel Rodriguez Espinosa To: [EMAIL PROTECTED] 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Reset a field
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: [EMAIL PROTECTED] 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Reset a field
Donde estas tratando hacer eso, en el command line cierto? O estas trabajando con mysql front o con algun otra programa? Perdon estoy muy nuevo no entiendo donde hacer alter table usuarios auto_increment = 1, mil gracias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]