create table with primary key and foreign key n postgres code example
Example 1: create table postgresql foreign key
CREATE TABLE so_items (
so_id INTEGER,
...
FOREIGN KEY (so_id) REFERENCES so_headers (id)
);
Example 2: create table postgresql primary key
CREATE TABLE TABLE (
column_1 data_type PRIMARY KEY,
column_2 data_type,
…
);