小于时间数据类型的操作
我想获得价值clock_in >= '07:30' and clock_in <= '12:00'
我使用查询:
SELECT clock_in,
Timetable
FROM kkpsurabaya
WHERE timetable = 'sabtu'
OR Timetable = 'minggu'
AND clock_in >= '07:30'
AND clock_in <= '11:00';
但是没有工作仍然显示时间为00:00:00的数据
答案 0 :(得分:0)
尝试以下查询。
SELECT clock_in,Timetable
FROM kkpsurabaya
WHERE timetable IN ('sabtu' ,'minggu' )
and clock_in between ( convert (TIME,'07:30:00 AM') and convert( TIME,'11:00:00 AM'))