create composite primary key in postgresql code example
Example 1: 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)
);
Example 2: create table postgresql primary key
CREATE TABLE TABLE (
column_1 data_type PRIMARY KEY,
column_2 data_type,
…
);