I have table with column with time Datatype.I want to compare the time in SQL.The main problem is when i compare any time with ’00:00:00’/’00:10:00′.
For e.g. select timings from train where trn_time > ’19:00:00′.
then in output i want ’00:00:00′ also wic I am not getting.
And I dont want to use ‘Datetime’ data type.
Please help.
i created a table in mysql with name ‘table11’
and inserted data as follows
and when i used following query
i got result
if you use tbl.time_col< ’19:00:00′ then only you will get ’00:00:00′ in the output.
i think in your case its better to use ‘Datetime’ datatype