How to store only time; not date and time?

You could try the INTERVAL DAY TO SECOND data type but it won’t save you any disk space … it is very suitable for this purpose though.

create table t1 (time_of_day interval day (0) to second(0));

insert into t1 values (TO_DSINTERVAL('0 23:59:59'));

select date '2009-05-13'+time_of_day
from   t1;

11 bytes though.

Leave a Comment