Instruction
You can also use BETWEEN with time data:
SELECT Code, DepartureTime FROM Route WHERE ArrivalTime BETWEEN '12:00:00' AND '15:00:00';
Remember that BETWEEN is inclusive—in the above query, routes that depart at 12 AM or 3 PM will be included in the results.
Exercise
Show the codes for all routes departing between 11 AM and 5 PM.
Stuck? Here's a hint!
Remember about the proper time format and use quotes: 'hh:mm:ss'. Note that 5:00 PM is '17:00:00' in T-SQL.



