Oracle SYSTIMESTAMP Function
The Oracle (PL/SQL) SYSTIMESTAMP function returns the system date, including fractional seconds and time zone, of the system on which the database resides. The return type is TIMESTAMP WITH TIME ZONE.
Syntax
SYSTIMESTAMP
Parameters
No parameter is required.
Return Value
Returns the current date and time set for the operating system on which the database resides.
Example 1:
The example below shows the usage of SYSTIMESTAMP function.
SYSTIMESTAMP Result: '27-DEC-2021 05:11:57.718988 AM +00:00'
Example 2:
Consider a database table called EmployeeLogin with the following records:
EmpID | Name | Login Stamp |
---|---|---|
1 | John | 25-OCT-2019 09:20:38.276815 AM +00:00 |
2 | Marry | 25-OCT-2019 09:21:05.123456 AM +00:00 |
3 | Jo | 25-OCT-2019 09:24:35.654321 AM +00:00 |
4 | Kim | 25-OCT-2019 09:25:24.122433 AM +00:00 |
5 | Ramesh | 25-OCT-2019 09:27:16.556711 AM +00:00 |
To insert a new record in this table, the following statement can be used.
INSERT INTO EmployeeLogin VALUES (6, 'Suresh', SYSTIMESTAMP); -- see the result SELECT * FROM EmployeeLogin;
This will produce a result similar to:
EmpID | Name | Login Stamp |
---|---|---|
1 | John | 25-OCT-2019 09:20:38.276815 AM +00:00 |
2 | Marry | 25-OCT-2019 09:21:05.123456 AM +00:00 |
3 | Jo | 25-OCT-2019 09:24:35.654321 AM +00:00 |
4 | Kim | 25-OCT-2019 09:25:24.122433 AM +00:00 |
5 | Ramesh | 25-OCT-2019 09:27:16.556711 AM +00:00 |
6 | Suresh | 25-OCT-2019 09:28:19.298518 AM +00:00 |
❮ Oracle Functions