I was having a problem when performing a constraint for my database in oracle 18 xe,
what I need is that the password has
- at least 5 characters
- at least two uppercase letters
- at least two lowercase letters
- at least one digit
I've done enough searching but can't find the right way, so far i wear this
ALTER TABLE USER
ADD CONSTRAINT PASSWORD_CHECK
REGEXP_LIKE(PASSWORD, '^.*[0-9]', 'c')
AND REGEXP_LIKE(PASSWORD, '^.*[A-Z]{2,}', 'c');
AND REGEXP_LIKE(PASSWORD, '^.*[a-z]{2,}', 'c');
AND REGEXP_LIKE(PASSWORD, '^[a-zA-Z0-9]{5,}$', 'c');
thanks for your support!