You may be aware of the old USERENV function, which returned session values such as the user’s session_id, language, and whether the user had DBA privileges. Although USERENV still exists for legacy ...
The 'magic' for want of a better word that makes this happen is triggers. This is a feature of high-end database systems like Oracle, SQL Server and MySQL that causes program code to execute via the ...