Oracle Database SQL — Question 134
You want to return the current date and time from the user session, with a data type of TIMESTAMP WITH TIME ZONE.
Which function will do this?
Answer options
- A. SYSDATE
- B. CURRENT_TIMESTAMP
- C. LOCALTIMESTAMP
- D. CURRENT_DATE
Correct answer: B
Explanation
The correct answer is CURRENT_TIMESTAMP, as it provides the current date and time along with the time zone information. SYSDATE returns the current date and time but does not include time zone data, LOCALTIMESTAMP gives the current date and time without time zone information, and CURRENT_DATE returns the current date but not the time in the context of the user's session.