postgres multi column primary key code example
Example 1: postgres alter table add primary key
-- To set a column as primary key:
ALTER TABLE distributors ADD PRIMARY KEY (tablename);
Example 2: 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)
);