C D E:
"TIMESTAMP WITH LOCAL TIME ZONE is another variant of TIMESTAMP that is sensitive to time zone information. It differs from TIMESTAMP WITH TIME ZONE in that data stored in the database is normalized to the database time zone, and the time zone information is not stored as part of the column data. When a user retrieves the data, Oracle returns it in the user's local session time zone."
So, the data is stored with the DB Timezone, even if it's retrieved with the session timezone.
A is clearly wrong by example, so the rest are true. With D and E we can also have an easy sample, while for C, which is apparently the most ambiguous, I agree with whom was saying that the TIMESTAMP data type contains indeed informations about day, month and year, and in the answer is never stated that they are the only ones present. So as it's put, it's definitely right.
https://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#GUID-CD2954CE-45E2-4938-A599-CCB96879510F
B is true for "TIMESTAMP WITH TIMEZONE" not for "TIMESTAMP WITH LOCAL TIMEZONE". So C is the next best as tit contains yy mm dd though it ALSO contains time information
Provided answers are wrong, by exclusion:
A. The CURRENT_TIMESTAMP function returns data without time zone information -->False, it is returned.
B. A TIMESTAMP WITH LOCAL TIMEZONE data type column is stored in the database using the time zone of the session that inserted the row
C. A TIMESTAMP data type column contains information about year, month, and day --> False, incomplete sentence.
D. The DBTIMEZONE function can return an offset from Universal Coordinated Time (UTC)
E. The SESSIONTIMEZONE function can return an offset from Universal Coordinated Time (UTC)
C is wrong. The TIMESTAMP datatype is an extension of the DATE datatype. It stores a year, month, day, hour, minute, and second values. It also stores fractional seconds, which are not stored by the DATE datatype. https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch4datetime.htm#:~:text=The%20TIMESTAMP%20datatype%20is%20an,stored%20by%20the%20DATE%20datatype.
B IS wrong.
TIMESTAMP WITH LOCAL TIME ZONE Data Type
TIMESTAMP WITH LOCAL TIME ZONE is another variant of TIMESTAMP. It differs from TIMESTAMP WITH TIME ZONE as follows: data stored in the database is normalized to the database time zone, and the time zone offset is not stored as part of the column data.
so session time zone must transform .
B, is only right if you supply the offset . Here is the test . Still B ? any thoughts?
alter session set time_zone='-7:00';
SQL> desc test3
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER
TIMES1 TIMESTAMP(6) WITH LOCAL TIME
ZONE
insert into test3 values (8, TIMESTAMP '2020-07-01 2:00:00 -8:00');
insert into test3 values (9,TIMESTAMP '2020-07-01 2:00:00');
SQL> select id,times1 from test3 where id in (8,9);
ID
----------
TIMES1
---------------------------------------------------------------------------
8
01-JUL-20 03.00.00.000000 AM
9
01-JUL-20 02.00.00.000000 AM
B - ... column is stored in the database ***using*** the time zone ...
in the first insert you are overwriting the offset
the second insert uses your session offset
i still believe B, D, E are correct..
C is wrong because The TIMESTAMP data type allows you to store date and time data including year, month, day, hour, minute and second.
I don't see any issue with answer C!
While it does also store hour, minute and seconds the answer doesn't state that it ONLY stores year, month and day - it does contain it which is true.
I'd go with C,D,E
Correct Answer: BCD
Wrong Answer: AE
https://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#NLSPG004
CURRENT_TIMESTAMP
Returns the current date and time in the session time zone as a TIMESTAMP WITH TIME ZONE value
select CURRENT_TIMESTAMP from dual;
-- CURRENT_TIMESTAMP
-- 28-JUL-20 09.56.37.618148000 AM AMERICA/LOS_ANGELES
DBTIMEZONE
Returns the value of the database time zone. The value is a time zone offset or a time zone region name
SESSIONTIMEZONE
Returns the value of the current session's time zone
SELECT sessiontimezone FROM DUAL;
-- SESSIONTIMEZONE
-- America/Los_Angeles
B is driving me crazy, but AE are wrong, so ...
but in one of my database the sessiontimezone Returns this:
SQL> select SESSIONTIMEZONE from dual;
SESSIONTIMEZONE
---------------------------------------------------------------------------
+02:00
SQL>
what you think?
A is wrong
SQL> select CURRENT_TIMESTAMP from dual;
CURRENT_TIMESTAMP
---------------------------------------------------------------------------
23.07.20 12:18:00,735965 +02:00
C is wrong …
SQL> select systimestamp from dual;
SYSTIMESTAMP
---------------------------------------------------------------------------
01.07.20 11:49:00,748290 +02:00
A is wrong It's local_timezone
B is wrong, it depend of the function used to insert
C is not "only" it can contain more information. => true
D true see documentation.
SESSIONTIMEZONE returns the time zone of the current session. The return type is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time zone region name, depending on how the user specified the session time zone value in the most recent ALTER SESSION statement.
E true see documentation
DBTIMEZONE returns the value of the database time zone. The return type is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time zone region name, depending on how the user specified the database time zone value in the most recent CREATE DATABASE or ALTER DATABASE statement.
SO C,D,E
upvoted 3 times
...
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
SimoneF
Highly Voted 3 years, 11 months agobraintop
Most Recent 1 week, 6 days agoauwia
1 year, 5 months agoyarsalan
2 years, 10 months agoMCzombie
3 years, 11 months agoheaaa
4 years agoChansi
4 years, 4 months agoNowOrNever
4 years, 2 months agoama
4 years, 4 months agoadoptc94
4 years, 3 months agoauwia
1 year, 5 months agoama
4 years, 4 months agoNowOrNever
4 years, 4 months agoama
4 years, 4 months agomamadu
1 year, 5 months agoama
4 years, 4 months agoyou1234
4 years, 5 months agoama
4 years, 5 months agoama
4 years, 5 months agodanito
4 years, 6 months agoama
4 years, 5 months agoelbelgounetos
3 years, 9 months ago