Create a multiple-column primary key using UNIQUE, if the columns are declared NOT NULL
mysql>
mysql> CREATE TABLE people
-> (
-> last_name CHAR(30) NOT NULL,
-> first_name CHAR(30) NOT NULL,
-> UNIQUE (last_name, first_name)
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> drop table people;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category