SQL table constraint limit number of same domain < 5
You need to normalize the database, or you'll have to use a trigger. There is a method of doing what you want, it can be done with F671, “Subqueries in CHECK constraints” however Oracle doesn't implement them. For that, you'll have to turn to everyone's favorite database, Microsoft Access.

To normalize create a table like this with a check constraint on the amount of attempts, then increase the amount of attempts. The CHECK constraint will resist incrementing past 5.

CREATE TABLE applicant (
  applicantNum     int        PRIMARY KEY,
  applicantentries smallint   CHECK ( applicantentries &lt; 5 )
);