On Wed, 27 Aug 2003 13:27:25 +0100
Simon <[EMAIL PROTECTED]> wrote:

> On Wednesday 27 August 2003 1:05 pm, bernardaum wrote:
> > Hi,
> >
> > I have a table with an auto_increment field. When I
> > delete all the record and insert a new one the
> > auto_increment field is not clean, its follows the
> > sequence.
> >
> > Can I restart this sequence? Start from 0 again?
> 
> When I need to do this, I just drop and re-create the table.

http://www.mysql.com/doc/en/TRUNCATE.html
"Truncate operations drop and re-create the table, which is much faster than deleting 
rows one by one." (c)

I suppose TRUNCATE is more efficient way to get the same result =)

---
WBR,
Antony Dovgal aka tony2001
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to