Well, if you dig in the Oracle documentation you'll discover that the built-in type code for "date" is 12.
But you don't known yet the dark side of the date ... the undocumented built-in type code 13...
CREATE TABLE test (dt DATE);
CREATE OR REPLACE VIEW test_vw (dt) AS SELECT TRUNC(dt,'DD') FROM test;
INSERT INTO test (DT) VALUES(TRUNC(SYSDATE,'DD'));
SELECT 'test' source,dt, SUBSTR(DUMP (dt),1,40) dump_dt FROM test
UNION
SELECT 'test_vw' source,dt, SUBSTR(DUMP (dt),1,40) dump_dt FROM test_vw
;
|
SOURCE
|
DT
|
DUMP_DT
|
|
test
|
20-MAR-08
|
Typ=12 Len=7: 120,108,3,20,1,1,1
|
|
test_vw
|
20-MAR-08
|
Typ=13 Len=8: 216,7,3,20,0,0,0,0
|