Introduction
Dates
Time
12. Time with logical operators
Timestamps
Extract functions
Timezone conversion
Intervals
Current date and time
Revision

Instruction

As you can see, the format for this type of data is hh:mm:ss, where hh stands for hours, mm for minutes and ss for seconds. This type of column requires apostrophes, just like dates.

SELECT code, departure
FROM route
WHERE arrival = '14:25:00';

Time requires the use of a 24-hour system (i.e. you should write 14:25 instead of 2:25 PM and 3:10 instead of 3:10 AM etc.). You can also use other comparison signs: >, >=, <, <=, !=.

Note: Oracle database does not support the data type time, even though it is in SQL Standard.

Exercise

Show the code of the route which arrives at 9:30 AM.

Stuck? Here's a hint!

Remember about the proper time format and use apostrophes: 'HH:MM:SS'. Don't use 'AM'.

Console

Code editor

Result

TableConsole