reset primary key im MySQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nevx009
Forum Newbie
Posts: 3
Joined: Sat Nov 14, 2009 1:38 pm

reset primary key im MySQL

Post by nevx009 »

can the primary key be reset to 1 in MYSQL ?
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Re: reset primary key im MySQL

Post by ianhull »

Yes, but you will lose your records.

TRUNCATE TABLE `tablename`
Post Reply