ALTER TABLE tbl_AccountAuthentications ADD (fnCheck NUMBER GENERATED ALWAYS AS (fnCheckValid(accountid_fk)) VIRTUAL); ALTER TABLE tbl_AccountAuthentications ADD CONSTRAINT chkCheckvalid CHECK(fnCheck <= 1);