MichaelK
0
Q:

postgres composite primary key

CREATE TABLE course_grades (
    quarter_id INTEGER,
    course_id TEXT,
    student_id INTEGER,
    grade INTEGER,
    PRIMARY KEY(quarter_id, course_id, student_id)
);
0
PRIMARY KEY(pk_1, pk_2, ..., pk_n)
0

New to Communities?

Join the community