Andrew Carlson wrote:
I have created a new table, with an auto_increment value. I would
like the
first auto_increment value to be 1001. So I -
1) inserted a fake record with an id of 1000
2) alter table tblname auto_increment=1000 (with and without a fake
record)
3) alter table tblname auto_increment=1001 (with and without a fake
record)
Mysql version is 5.0.38 using MyIsam tables. Can someone explain
auto_increment, more than what is in the manual? I have read it, and
apparently I am missing something or don't understand it. Thanks!
mysql> CREATE TEMPORARY TABLE autotest (
-> id INT UNSIGNED NOT NULL AUTO_INCREMENT,
-> name VARCHAR(10) NOT NULL,
-> PRIMARY KEY (id))
-> AUTO_INCREMENT = 1001;
mysql> INSERT INTO autotest (name) VALUES ('Gary'), ('Andrew'), ('Paul');
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM autotest;
+------+--------+
| id | name |
+------+--------+
| 1001 | Gary |
| 1002 | Andrew |
| 1003 | Paul |
+------+--------+
3 rows in set (0.01 sec)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]