Sounds like you are looking for SQL unique constraints (apply them to the two columns you don't want value to be repeated):
SQL UNIQUE Constraint[
^]
SQL - UNIQUE Constraint - Tutorialspoint[
^]
For example, the following SQL query creates a new table called CUSTOMERS and adds five columns. Here, the AGE column is set to UNIQUE, so that you cannot have two records with the same age.
CREATE TABLE CUSTOMERS(
ID INT NOT NULL,
NAME VARCHAR (20) NOT NULL,
AGE INT NOT NULL UNIQUE,
ADDRESS CHAR (25) ,
SALARY DECIMAL (18, 2),
PRIMARY KEY (ID)
);