If you were creating a primary key on more than one column, you would include both of those column names in th
e parentheses
mysql>
mysql> CREATE TABLE Orders
-> (
-> OrderID SMALLINT UNSIGNED NOT NULL,
-> ModelID SMALLINT UNSIGNED NOT NULL,
-> ModelDescrip VARCHAR(40),
-> PRIMARY KEY (OrderID, ModelID)
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> drop table Orders;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category