Can a function execute dml stmts.
Below is the message when tried to execute a function with an update/insert stmts

ORA-06571: Function TESTUPD does not guarantee not to update database