MySQL Forums
Forum List  »  Newbie

Automatic field in a table
Posted by: zahrah Land
Date: November 20, 2010 09:08AM

Hi,

I made a table with the following command:
create table book(bookid int not null auto_increment, bookname varchar(50));

I tried to insert 8 books in this table and I managed to do that but I deleted them and that has been done successfuly. then I started adding a new book but the problem is when I write the command
select * from book;
I found my book but its bookid=9, although there is only one book in my table and the eigth previous books have been deleted. Why this is happeneing?? How can I start with 1 ? Is it because bookid automatic ?

Sorry for explain everything but I want the picture to be clear.
thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
Automatic field in a table
November 20, 2010 09:08AM
November 20, 2010 11:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.