I'm working with MySQL 3.23.36 so, according to "MySQL, Paul Dubois, New Riders" running the query:

"DELETE FROM my_table_name"

should reset the auto-increment value... but it doesnt'.

What SQL do I use to reset the val.
You can't believe anything that book says.  The author didn't even include
anything about TRUNCATE TABLE my_table_name.
Nope. That doesn't do it either!

I go:

TRUNCATE TABLE my_table

then:

INSERT INTO my_table SET Name='Jeff'

then:

SELECT * FROM my_table

and lo-and-behold, the 'Ref' primary key auto-update field is 37062, not 1 as I hoped.

I am managing to reset it to '1' by using a windows mysql client program but it doesn't show me what SQL it's executing in order to obtain the desired result.

Thanks,


Jeff



---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to