SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL

For Complete YouTube Video: Click Here

In this class, we will understand SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL.

We have already covered the concepts of number functions.

SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL

SYSDATE

The SYSDATE function will get the date on the machine upon which the DBMS software is located.

SELECT SYSDATE FROM DUAL;

The output of the query is as shown below.

SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL 1
SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL 1

CURRENT_DATE

The CURRENT_DATE function will get the date on the user machine.

SELECT CURRENT_DATE FROM DUAL;

The output of the query is as shown below.

SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL 2
SYSDATE CURRENT_DATE SYSTIMESTAMP Functions 2

As the DBMS software location and the user machine are the same, we will get the same result.

SYSTIMESTAMP

The SYSTIMESTAMP function will get the time on the machine upon which the DBMS software is located.

SELECT SYSTIMESTAMP FROM DUAL;

The output of the query is as shown below.

SYSDATE CURRENT_DATE SYSTIMESTAMP Functions in SQL 3
SYSDATE CURRENT_DATE SYSTIMESTAMP Functions 3