Jonathan,

> The O'Reilly "Managing & Using MySQL" show on page 288 a table been
created
> with two options "...)AUTO_INCREMENT = 1, TYPE=InnoDB;"
>
> But the MySQL manual says "or":-
>
> table_options:
> TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
> or AUTO_INCREMENT = #

Oh, I stumbled over this one, too. Here's my explanation :)

mysql> CREATE TABLE autotest_myisam (id INT UNSIGNED NOT NULL
AUTO_INCREMENT PRIMARY KEY) TYPE=MyISAM AUTO_INCREMENT=100;
Query OK, 0 rows affected (0.08 sec)

mysql> INSERT INTO autotest_myisam VALUES (NULL);
Query OK, 1 row affected (0.01 sec)

mysql> SELECT * FROM autotest_myisam;
+-----+
| id  |
+-----+
| 100 |
+-----+
1 row in set (0.02 sec)

mysql> CREATE TABLE autotest_InnoDB (id INT UNSIGNED NOT NULL
AUTO_INCREMENT PRIMARY KEY) TYPE=InnoDB AUTO_INCREMENT=100;
Query OK, 0 rows affected (0.10 sec)

mysql> INSERT INTO autotest_InnoDB VALUES (NULL);
Query OK, 1 row affected (0.07 sec)

mysql> SELECT * FROM autotest_InnoDB;
+----+
| id |
+----+
|  1 |
+----+
1 row in set (0.00 sec)

As you see, TYPE=MyISAM AND AUTO_INCREMENT=100 works, but TYPE=InnoDB
AND AUTO_INCREMENT=100 does not work. But isn't it supposed to be 'xor'
instead of 'or'? ;-)

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

----- Original Message -----
From: "Jonathan Bedford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 9:12 AM
Subject: Question about Table_Options


> Hi
>
> When creating a table can you use multiple Table_Options?
>
> The O'Reilly "Managing & Using MySQL" show on page 288 a table been
created
> with two options "...)AUTO_INCREMENT = 1, TYPE=InnoDB;"
>
> But the MySQL manual says "or":-
>
> table_options:
> TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
> or AUTO_INCREMENT = #
> .....
>
> Thanks
>   Jonathan
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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

Reply via email to