SQL> conn hbjb_kf_ts/test@s9
已连接。
SQL> select aic162 from ic10 where aic162 is not null and rownum <2;
AIC162
--------------
01-1月 -08
已选择1行。
SQL> alter session set nls_date_format='yyyy/mm/dd';
会话已更改。
SQL> select aic162 from ic10 where aic162 is not null and rownum <2;
AIC162
----------
2008/01/01
已选择1行。
SQL> discon
从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options 断开
SQL> conn hbjb_kf_ts/test@s9
已连接。
SQL> select aic162 from ic10 where aic162 is not null and rownum <2;
AIC162
--------------
01-1月 -08
已选择1行。
可见:alter session语句只在本session范围内起作用,同时也使用了一下nls_date_format。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7204674/viewspace-621534/
,如需转载,请注明出处,否则将追究法律责任。