Globalization question
Date: Thu, 11 Dec 2008 10:54:13 +0000
Message-ID: <f7321f200812110254m1f563f1as7088ffc8a6d44744@mail.gmail.com>
Hi,
I'm currently preparing my ocp 10g and had the following question about globalization:
*You created the ORDERS table in your database by using the following code:*
*SQL> CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);*
*Then, you inserted data in the ORDERS table and saved it by issuing the
following statements:*
*SQL> INSERT INTO ORDERS VALUES('18-AUG-00 10:26:44 PM America/New_York');*
*SQL> INSERT INTO ORDERS VALUES('23-AUG-02 12:46:34 PM America/New_York');*
*SQL> COMMIT;*
*Next, you issued the following statement to change the time zone for the
database:*
*SQL> ALTER DATABASE SET TIME_ZONE='Europe/London';*
*What will be the result of executing the above statement?*
- The statement will fail.*
- The statement will be executed successfully, and the new time zone will be set for the database.*
- The statement will be executed successfully, but the new time zone will be set for the current session.*
- The statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.*
*Answer:*
*The statement will fail.*
When I run this on my database, the ALTER DATABASE... statement does not fail (see below). However, I have tried putting London, Athens or whatever city and when I query sysdate from dual I always get my local time. So I guess the last one is the correct one? or did I miss anything here?
*SQL> CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);
Table created.
SQL> INSERT INTO ORDERS VALUES('18-AUG-00 10:26:44 PM America/New_York');
1 row created.
SQL> INSERT INTO ORDERS VALUES('23-AUG-02 12:46:34 PM America/New_York');
1 row created.
SQL> commit;
Commit complete.
SQL> ALTER DATABASE SET TIME_ZONE='Europe/London';
Database altered.*
Thanks for your help!
David
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Dec 11 2008 - 04:54:13 CST