SQL> create table aa(a date);
Table created.
SQL> alter session set nls_date_format='yyyy-mm-dd';
Session altered.
SQL> insert into aa select date'-9999-01-01' from dual;
insert into aa select date'-9999-01-01' from dual
*
ERROR at line 1:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
SQL> insert into aa select date'0000-01-01' from dual;
1 row created.
SQL> select * from aa;
A
----------
0000-01-01
SQL> insert into aa select date'-0001-01-01' from dual;
1 row created.
SQL> select * from aa;
A
----------
0000-01-01
0001-01-01
SQL> insert into aa select date'-0000-01-01' from dual;
1 row created.
SQL> select * from aa;
A
----------
0000-01-01
0001-01-01
0000-01-01
SQL> insert into aa select date'-1000-01-01' from dual;
1 row created.
SQL> select * from aa;
A
----------
0000-01-01
0001-01-01
0000-01-01
1000-01-01
-----------
Platform Information:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Solaris: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production
阅读(1696) | 评论(0) | 转发(0) |