My table is as follows:
CREATE TABLE IF NOT EXISTS PHONES (
number VARCHAR(10),
id INT,
type VARCHAR(10),
PRIMARY KEY (number),
FOREIGN KEY (id)
REFERENCES TECHNICIANS(id)
ON DELETE CASCADE
) ENGINE = INNODB;
I would like to specify for each id one primary contact number. I was thinking of adding a boolean column, but I can't figure out how to get it to only allow one "true" value per. id.