So sprach Viken Nokhoudian am Tue, Jan 30, 2001 at 12:57:50PM -0800:
> When a table has an auto-incrementing ID field and the last inserted
> record had an ID of, say, 100, then I delete that record, the database
> engine will re-use the 100 value. How can I get the engine to never
> repeat an ID value to avoid corrupted data correlations?
Huh?? This does not happen here with mysql .31!
mysql> describe TEST;
+-------+------------+------+-----+---------+----------------+---------------------------------+
| Field | Type | Null | Key | Default | Extra | Privileges
| |
+-------+------------+------+-----+---------+----------------+---------------------------------+
| ID | tinyint(4) | | PRI | NULL | auto_increment |
|select,insert,update,references |
| Value | tinyint(4) | | | 0 | |
|select,insert,update,references |
+-------+------------+------+-----+---------+----------------+---------------------------------+
mysql> insert into TEST (Value) values (1);
Query OK, 1 row affected (0.00 sec)
mysql> select * from TEST;
+----+-------+
| ID | Value |
+----+-------+
| 1 | 1 |
+----+-------+
1 row in set (0.00 sec)
mysql> delete from TEST where Value='1';
Query OK, 1 row affected (0.00 sec)
mysql> insert into TEST (Value) values (2);
Query OK, 1 row affected (0.00 sec)
mysql> select * from TEST;
+----+-------+
| ID | Value |
+----+-------+
| 2 | 2 |
+----+-------+
1 row in set (0.00 sec)
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 2 hours 38 minutes
---------------------------------------------------------------------
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