日期:2014-05-17 浏览次数:21108 次
SQL> show user
USER 为 "SCOTT"
SQL> ed
已写入 file afiedt.buf
1 CREATE TABLE test(
2 nowdate DATE
3* )
SQL> /
表已创建。
SQL> ed
已写入 file afiedt.buf
1 Insert into test
2* values (to_date(to_char(sysdate,'yyyy-mm-dd') || '13:12:10','YYYY-M
4:MI:SS'))
SQL> /
已创建 1 行。
SQL> select * from test;
NOWDATE
--------------
09-2月 -12
SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
会话已更改。
SQL> select * from test;
NOWDATE
-------------------
2012-02-09 13:12:10