create table aaa
(
thedate date
)
就可以,因为date是7字节的,到秒的

解决方案 »

  1.   

    好象不行
    因为我用
    insert into aaa(thedate,aaa)
    values(sysdate,'sjfal;');结果是2004-8-6 18 'sjfal
    只能显示到小时
      

  2.   

    那你就把sysdate的格式设置以下
    alter session set nls_date_formate='yyyy-mm-dd hh:mm:ss'
      

  3.   

    SQL>alter session set nls_date_formate='yyyy-mm-dd hh:mm:ss';
    结果是:
    alter session set nls_date_formate='yyyy-mm-dd hh:mm:ss'ORA-00922: missing or invalid option
    为什么?
      

  4.   

    alter session set nls_date_format='yyyy-mm-dd hh:mm:ss'
      

  5.   

    alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss'
      

  6.   

    insert into aaa(thedate,aaa)
    values(to_date('2004-08-06 19:21:21','yyyy-mm-dd hh24:mi:ss'),'sjfal;');
    就可以了
      

  7.   

    不管当前的格式是什么,都可以使用转换的方式来实现>
    insert into table values(...,to_date('2004-0801 18:08:08','yyyy-mm-dd hh24:mi:ss',...)select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual,  
    来实现日期格式的转换.