Select - Time comparison does not work

0

I'm trying to make a query to eliminate results in which the end time of the event is equal to 00:00:00, I made the query this way:

select nome, local, hora_inicio, hora_fim, data_inicio, data_fim 
from agenda
where hora_fim <> 00:00:00;

PS: I also tried putting! = instead of < & gt ;, but it also did not work, it keeps returning events with end time equal to 00:00:00.

PS: The start-time and end-time fields are like time in the database.

    
asked by anonymous 21.02.2017 / 19:48

1 answer

1

Use the TIME () function:

select nome, local, hora_inicio, hora_fim, data_inicio, data_fim 
from agenda
where TIME('hora_fim') <> '00:00:00';
    
21.02.2017 / 19:53