referencing part of the composite primary key
- by Zavael
I have problems with setting the reference on database table.
I have following structure:
CREATE TABLE club(
id INTEGER NOT NULL,
name_short VARCHAR(30),
name_full VARCHAR(70) NOT NULL
);
CREATE UNIQUE INDEX club_uix ON club(id);
ALTER TABLE club ADD CONSTRAINT club_pk PRIMARY KEY (id);
CREATE TABLE team(
id INTEGER NOT NULL,
…