insert tabel insert (date1) values (to_date('2003-07','yyyy-mm'));

解决方案 »

  1.   

    SQL> create table test(
      2  c1 date );Table created.SQL> insert into test values (to_date('2003-02-20','yyyy-mm-dd'));1 row created.SQL> insert into test values (to_date('2003/02/20','yyyy/mm/dd'));1 row created.SQL> select * from test;C1
    ---------
    20-FEB-03
    20-FEB-03
      

  2.   

    你写数据库的时候可以用to_date()函数格式就是to_date('字段内容','格式')
    如果你需要取出数据进行操作比较的时候可以用to_char()转字符串函数