Create a primary key on the last_name and first_name columns using a PRIMARY KEY clause
mysql>
mysql> CREATE TABLE people
-> (
-> last_name CHAR(30) NOT NULL,
-> first_name CHAR(30) NOT NULL,
-> PRIMARY KEY (last_name, first_name)
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> drop table people;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category