Is there a way to perform an ALTER SESSION SET time_zone='America/New_York' within a stored procedure/package? I want to chan开发者_JAVA技巧ge the session TZ to NY then return it back to what it was before.
SQL> begin
2 execute immediate 'alter session SET TIME_ZONE=''America/New_York''';
3 end;
4 /
PL/SQL procedure successfully completed
SQL> select sessiontimezone from dual
2 /
SESSIONTIMEZONE
---------------------------------------------------------------------------
America/New_York
SQL>
精彩评论