CURRENT_TIME

CURRENT_TIME is a built-in SQL function that retrieves the current time in the system running the SQL queries. The output is in 'HH:MI:SS' format (hour, minute, second). The time is based on a 24-hour clock.

CURRENT_TIME()

Example

SELECT CURRENT_TIME;

Output

23:45:34

Explanation

In the example, the SQL function CURRENT_TIME is used to get the current time from the system where the database server runs. The output is in 24-hour format (HH:MM:SS). The exact time presented in the output depends on when the function is called.

CURRENT_TIME()

Example

SELECT CURRENT_TIME;

Output

15:45:57.847514

Explanation

The CURRENT_TIME function in PostgreSQL returns the current time of the server. The format of the time returned is HH:MM:SS.

CURRENT_TIME()

Example

SELECT CURRENT_TIME;

Output

15:26:33

Explanation

The CURRENT_TIME function in SQLite returns the current system time in ‘HH:MM:SS’ format. In the example, it’s ‘15:26:33’, which is the current system time when the command was executed.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.