website logo
⌘K
šŸ Homepage
šŸ‘‹Introduction
Key Concepts & Architecture
šŸš€Run Oxla in 2 minutes
šŸƒā€ā™‚ļøRun Oxla on S3
šŸ›«Multi-node Deployment
šŸ‘Øā€šŸ’»SQL Reference
SQL Queries
SQL Clauses
SQL Data Types
SQL Functions
Schema
Comment Support
🚨Error Handling
šŸ†šDifferences Between Oxla vs. PostgreSQL
šŸ“ˆPublic Metrics
Docs powered by
Archbee
SQL Reference
SQL Data Types

Time Type

8min

Overview

The TIME 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:

Format
|
HH:MM:SS[.SSSSSS]

  • 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 the start_time column.

Create a table
|
CREATE TABLE employee_schedule (
    employee_name TEXT,
    start_time TIME
);

INSERT INTO employee_schedule (employee_name, start_time)
VALUES
('John Doe', '08:30:00'),
('Jane Smith', '09:00:00'),
('Michael Johnson', '10:15:00');


The table has been successfully created after executing the above query:

Insert data
|
COMPLETE
INSERT 0 3


#Case 2: View the Employee Schedule

To view all employee schedules in the employee_schedule table, we can use the SELECT statement.

Display the table
|
SELECT * FROM employee_schedule;


The output will display the employee names and their corresponding scheduled start times:

Output
|
  employee_name  |   start_time    
-----------------+-----------------
 John Doe        | 08:30:00.000000
 Jane Smith      | 09:00:00.000000
 Michael Johnson | 10:15:00.000000
(3 rows)




Updated 31 Aug 2023
Did this page help you?
PREVIOUS
Timestamp with Time Zone
NEXT
Interval Type
Docs powered by
Archbee
TABLE OF CONTENTS
Overview
Format
Examples
#Case 1: Create a Schedule Table
#Case 2: View the Employee Schedule
Docs powered by
Archbee

Dedicated to data analytics that provides 10x faster execution of analytical queries than current state of the art solutions. We are launching SOON! Join the waiting list for more info.




©2023 Oxla