Skip
Arish's avatar

257. Practice - Composite PK


Exercise: Multi-Column Key

Create table with composite key.

Solution

sql
1CREATE TABLE grades (
2  student_id INTEGER,
3  subject TEXT,
4  grade TEXT,
5  PRIMARY KEY (student_id, subject)
6);