2
I need to save only the hour and minutes (seconds make no difference, so having or not, whatever) I should use TIME
or TIMESTAMP
?
I started doing with TIMESTAMP(6)
, but I’m having a hard time insert
, what I must do ?
my insert:
INSERT INTO EXEMPLO (DESCRICAO, NUMEROMAXIMO, HORAENTRADA, HORASAIDA)
VALUES ('Descrição', '50', '15:51:00', '16:51:00');
Just to clarify a few things: Oracle does not have a field of only hours (time). The data type date stores: century, year, month ,day, hours, minutes and seconds. You can create these columns date and time and insert a date like: 1-1-1900, and only work with the hours and minutes. The other option is to use text (but this complicates any account you want to do with these values)
– Renato Afonso