Use a PRIMARY KEY constraint
mysql> CREATE TABLE Orders
-> (
-> OrderID SMALLINT UNSIGNED NOT NULL,
-> ModelID SMALLINT UNSIGNED NOT NULL,
-> ModelDescrip VARCHAR(40),
-> PRIMARY KEY (OrderID)
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql> drop table Orders;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category