1 测试一
SQL> create table test(create_time timestamp(6));
Table created
SQL> insert into test values(sysdate);
1 row inserted
SQL> commit;
Commit complete
SQL> select dump(CREATED_TIME) from test;
select dump(CREATED_TIME) from test
ORA-00904: "CREATED_TIME": 标识符无效
SQL> select dump(create_time) from test;
DUMP(CREATE_TIME)
--------------------------------------------------------------------------------
Typ=180 Len=7: 120,113,10,28,17,22,12
SQL> create table test1 (create_time timestamp);
Table created
SQL> insert into test1 values(sysdate);
1 row inserted
SQL> commit;
Commit complete
SQL> select dump(create_time) from test1;
DUMP(CREATE_TIME)
--------------------------------------------------------------------------------
Typ=180 Len=7: 120,113,10,28,17,23,60
SQL> create table test2 (create_time date);
Table created
SQL> insert into test2 values(sysdate);
1 row inserted
SQL> commit;
Commit complete
SQL> select dump(create_time) from test2;
DUMP(CREATE_TIME)
--------------------------------------------------------------------------------
Typ=12 Len=7: 120,113,10,28,17,25,44
SQL>
2 测试2
SQL> select dump(to_timestamp('2013-09-10','yyyy-mm-dd')) from dual;
DUMP(TO_TIMESTAMP('2013-09-10'
--------------------------------------------------------------------------------
Typ=187 Len=20: 221,7,9,10,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0
SQL> select dump(to_date('2013-09-10','yyyy-mm-dd')) from dual;
DUMP(TO_DATE('2013-09-10','YYY
--------------------------------------------------------------------------------
Typ=13 Len=8: 221,7,9,10,0,0,0,0
SQL>
注:怎么两个案例时间类型的长度是不一致的呢????