개인적인 정리

Oracle LOCALTIMESTAMP() 본문

DB/ORACLE

Oracle LOCALTIMESTAMP()

yeon.Biju 2020. 4. 8. 21:42

오라클 LOCALTIMESTAMP()

 

LOCALTIMESTAMP()

   - 

 

LOCALTIMESTAMP(timestamp_precision)

의 형태

 

LOCALTIMESTAMP returns the current date and time in the session time zone in a value of data type TIMESTAMP. The difference between this function and CURRENT_TIMESTAMP is that LOCALTIMESTAMP returns a TIMESTAMP value while CURRENT_TIMESTAMP returns TIMESTAMP WITH TIME ZONE value.

 

The optional argument timestamp_precision specifies the fractional second precision of the time value returned.

 

SQL > SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL ;

   --> 2020/04/08 PM 21:39:06.268000 +09:00          2020/04/08 PM 21:39:06.268000

 

SQL> ALTER SESSION SET TIME_ZONE = '-5:00'; 

SQL> SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL ;

   --> 2020/04/08 AM 7:40:21.098000 -05:00            2020/04/08 AM 7:40:21.098000

'DB > ORACLE' 카테고리의 다른 글

[Oracle] LTRIM()  (0) 2020.04.08
[Oracle] LPAD()  (0) 2020.04.08
[Oracle] LOWER()  (0) 2020.04.08
[Oracle] LOG()  (0) 2020.04.08
Oracle LNNVL()  (0) 2020.04.08
Oracle LN()  (0) 2020.04.08
Oracle LISTAGG()  (0) 2020.04.08
Oracle LENGTH()  (0) 2020.04.07
Comments