Hi there,
I'm new to db2, sorry if this question sounds stupid.
I have a table:
CREATE TABLE Fielding_Stats(
pid INT REFERENCES Player(id) NOT NULL,
year INT(4) NOT NULL,
fielding_attempts INT(4) NOT NULL,
fielding_errors(4) NOT NULL
)
I cannot make the pid the primary key for this table because if a player plays for multiple years, he will have multiple entries in this table.
Is there a way I can 'combine' pid and year, as this would create a unique key.
Thanks!