为什么建个 check 约束总是报无效月份呢?
 window   XP   中文版   +   oracle10g     
 为什么建个   check   约束总是报无效月份呢?      
 已经将nls_date_format加在环境变量中了.   如下:     
 C:\> set   nls_date_format 
 nls_date_format=dd-mm-yyyy     
 SQL>    select   sysdate   from   dual;   
 SYSDATE 
 ---------- 
 16-09-2007     
 SQL>    CREATE   TABLE   test   (    
       2      product_name      VARCHAR2(25),    
       3      salesperson         VARCHAR2(3), 
       4      purchase_date   DATE,    
       5      quantity                  NUMBER(4,2) 
       6      );     
 SQL>    alter   table   test 
       2            add   constraint   reasonable_date 
       3            check(purchase_date   is   not   null   and   purchase_date   > =    '30-07-2003 '); 
 alter   table   plsql101_purchase 
 * 
 第   1   行出现错误: 
 ORA-01843:   无效的月份     
------解决方案--------------------check(purchase_date is not null and purchase_date > =  '30-07-2003 '); 
 改为: 
 check(purchase_date is not null and purchase_date > = to_date( '30-07-2003 00:00:00 ', 'dd/mm/yyyy hh24:mi:ss '));   
 拜托,回帖有点公德心好不好。