Using three column as the primary key
mysql>
mysql>
mysql> CREATE TABLE DIPLOMAS
-> (STUDENT INTEGER NOT NULL,
-> COURSE INTEGER NOT NULL,
-> DDATE DATE NOT NULL,
-> SUCCESSFUL CHAR(1),
-> LOCATION VARCHAR(50),
-> PRIMARY KEY (STUDENT, COURSE, DDATE));
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> drop table diplomas;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category