Overview
TheTIME data type in Oxla stores time values without any date information. It represents a specific time of day, independent of any time zone or date.
Format
The format for the TIME data type is as follows:HH: One or two-digit hour (valid values from 00 to 23).MM: One or two-digit minutes (valid values from 00 to 59).SS: One or two-digit seconds (valid values from 00 to 59).[.SSSSSS]: Optional fractional seconds, with up to six decimal places (microsecond precision).
Examples
#Case 1: Create a Schedule Table
Let’s create a table to manage employee schedules, containing their names and the time they are scheduled to start work. The TIME data type will be used for thestart_time column.
#Case 2: View the Employee Schedule
To view all employee schedules in theemployee_schedule table, we can use the SELECT statement.