I need to make a trigger that will prevent the same employee from joining more than one crew on the same day.
The crew table is as follows:
Tripulação = {id_Voo, data, id_Funcionário }
The 3 attributes are together the primary key.
What I want to do here is to see if there already exists in the same row of the table Tripulação
o :new.id_Funcionário
and :new.data
.