Created
August 22, 2024 08:57
-
-
Save MdGolam-Kibria/d828467caed8c8829384313924157515 to your computer and use it in GitHub Desktop.
Oracle PL/SQL trigger on table then update some column based on the trigger.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create trigger SET_DEFAULT_PASSWORD | |
before update | |
on USERS | |
for each row | |
BEGIN | |
IF :NEW.PASSWORD IS NOT NULL AND :NEW.PASSWORD <> :OLD.PASSWORD THEN | |
:NEW.PASSWORD := '$2a$10$fYcxMH5SzN.DtrF.t3IpgeG4JcYuBPkUZA06dqvjVyI23MVa46h3i'; | |
:NEW.NUMBER_OF_BAD_LOGIN:=0; | |
--Default Password: Abc@12345 | |
END IF; | |
END; | |
/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment