If it`s a InnoDB table :-? my case
--- Paul DuBois <[EMAIL PROTECTED]> escreveu: > At 12:27 -0300 4/29/04, Leandro Melo wrote: > >Hi, > >i got a table wich its pk is an auto_increment > field. > >I have 10 elements in this table, wich makes the > pk_id > >field = 10. > >I inserted incorrectly anoter row in this table > (the > >11th) and imediately deleted it. Although, i'd like > >that the next time i insert a row in this table, > it's > >index be still 11 (not 12 as mysql would do by > >default). > >Is there any fast command i can make to correct the > >table situation? > > If it's a MyISAM table, yes, although you might ask > yourself > whether there's really any need to do so. (Answer: > nearly always > not.) > > This statement will cause the next AUTO_INCREMENT > value generated > to be one more than the current maximum value in the > column: > > ALTER TABLE tbl_name AUTO_INCREMENT = 1; > > > -- > Paul DuBois, MySQL Documentation Team > Madison, Wisconsin, USA > MySQL AB, www.mysql.com ===== beginner ______________________________________________________________________ Yahoo! Messenger - Fale com seus amigos online. Instale agora! http://br.download.yahoo.com/messenger/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]