For example, suppose you have a table named appointments with a start_time column
of type time. To select rows where the start_time is between 9:00 AM and 5:00 PM,
you could use the following SELECT statement:
SELECT * FROM appointments
WHERE start_time BETWEEN '09:00:00' AND '17:00:00';
Note that the BETWEEN operator is inclusive, so this query will return rows where the
start_time is exactly 9:00 AM or 5:00 PM.
If you want to exclude these times from the results, you can use the > and < operators
instead:
SELECT * FROM appointments
WHERE start_time > '09:00:00' AND start_time < '17:00:00';