MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 20th, 2000, 11:30 PM
CyberOsc CyberOsc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Indonesia
Posts: 87 CyberOsc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Say it I have a table like this :

table testing
id_Num int not null auto_increment
data varchar(250) not null
primary key(id_Num)

Then I insert into the table :
insert into testing (data) values ("Testing");

I do it until it has about 3 records.

Then I delete record number 3.
After that I insert another record, according to me the id_Num should be 3. Isn't it??

The fact id_Num of the new record is 4.

I tried it at home and I got what I want (the id_Num of new record id 3), but at college it doesn't work !!

Can anybody tell me why ???



------------------
** It's the world of Oscario **

Reply With Quote
  #2  
Old August 21st, 2000, 03:03 AM
scoobydoo scoobydoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: Sydney, Australia
Posts: 32 scoobydoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Yeah.. i sort of wanted to know how to do that too..

This i haven't tried.. but have you tried to set the default to 0??

Tell me if it works..

scoobydoo

Reply With Quote
  #3  
Old August 21st, 2000, 07:33 AM
CyberOsc CyberOsc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Indonesia
Posts: 87 CyberOsc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Finally...
I found it.

Just check out the documentation in www.mysql.com

It's said that my problem is caused by the type of the table.

MyISAM table can't do that !!
But ISAM table can.
So I just change the type of my table by issuing :
"alter table tablename type=ISAM"

or create the table with ISAM type by issuing :
" create table tablename (fields specification) type = ISAM"

And the problems solved out !!

See ya !!!



------------------
** It's the world of Oscario **

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > auto_increment in MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway