Defining Auto-Increment Columns
mysql>
mysql> CREATE TABLE Catalog
-> (
-> ProductID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
-> Name VARCHAR(40) NOT NULL,
-> PRIMARY KEY (ProductID)
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> drop table Catalog;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category