• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

current_timestamp function in oracle sql

Oracle/SQL CURRENT_TIMESTAMP Function

November 5, 2012 by techhoneyadmin

Oracle CURRENT_TIMESTAMP FunctionOracle CURRENT_TIMESTAMP Function is used to return the current date and time of the current SQL session. SQL CURRENT_TIMESTAMP returns the TIME STAMP with the TIME ZONE value.


Oracle CURRENT_TIMESTAMP Function Syntax

SELECT CURRENT_TIMESTAMP
FROM table_name;

SQL CURRENT_TIMESTAMP Function returns the date and time as set by the SQL ALTER SESSION statement.


Oracle CURRENT_TIMESTAMP Function – Using SQL SELECT Statement Example

SQL CURRENT_TIMESTAMP Function is used with the SQL SELECT Statement.

For example, the SQL CURRENT_TIMESTAMP query below returns the current date/time with time zone of the current SQL session

SELECT CURRENT_TIMESTAMP
FROM DUAL;

May return something like “11/5/2012 12:05:49.054000 PM +05:30” depending upon the value of the SQL Session date/time settings.


Oracle CURRENT_TIMESTAMP Function – Using ALTER SESSION Example

We can alter the session time of the SQL SESSION by using the SQL ALTER SESSION Statement.

For example, the below SQL query will alter the time zone of the SQL session to “-7:00”

ALTER SESSION SET TIME_ZONE = '-7:0';

Now, the below SQL CURRENT_TIMESTAMP query returns the altered time stamp.

SELECT CURRENT_TIMESTAMP
FROM DUAL;

May return something like “11/4/2012 11:36:06.800000 PM -07:00” as the time zone has been altered.


Filed Under: function Tagged With: CURRENTTIMESTAMPPLSQL, current_timestamp function in oracle plsql, current_timestamp function in oracle sql, how to use current_timestamp function in oracle database query, how to use current_timestamp function in oracle plsql, how to use current_timestamp function in oracle sql, syntax and example of current_timestamp function in oracle database query, syntax and example of current_timestamp function in oracle plsql, syntax and example of current_timestamp function in oracle sql, using current_timestamp function in oracle database query, using current_timestamp function in oracle plsql, using current_timestamp function in oracle sql

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in