在MySQL中,我可以使用单个@创建一个访问会话变量.示例初始化:
set @myVar = true;
一些包含此代码的触发器:
if (@myVar is not true) then execute something
Oracle 10g中的等价物是什么?
SQL> EXEC DBMS_SESSION.SET_CONTEXT('CLIENTCONTEXT', 'myvar', 'myvalue'); PL/SQL procedure successfully completed SQL> SELECT SYS_CONTEXT('CLIENTCONTEXT', 'myvar') FROM dual; SYS_CONTEXT('CLIENTCONTEXT','M -------------------------------------------------------------------------------- myvalue