137. Which three possible values can be set for the TIME_ZONE session
parameter by using the ALTER SESSION command? (Choose three.)
A. 'os'
B. local
C. '-8:00'
D. dbtimezone
E. 'Australia'
Answer: BCD
SQL> ALTER SESSION SET TIME_ZONE = local;
SQL> ALTER SESSION SET TIME_ZONE = dbtimezone;
SQL> ALTER SESSION SET TIME_ZONE = '+08:00';
SQL> ALTER SESSION SET TIME_ZONE = 'Europe/London';
TIME_ZONE = '[+ | -] hh:mm' | LOCAL | DBTIMEZONE | 'time_zone_region'
The TIME_ZONE parameter specifies the default local time zone offset or region name for the current SQL session. TIME_ZONE is a session parameter only, not an initialization parameter. To determine the time zone of the current session, query the built-in function SESSIONTIMEZONE (see SESSIONTIMEZONE).
-
Specify a format mask (
'[+|-]hh:mm') indicating the hours and minutes before or after UTC (Coordinated Universal Time--formerly Greenwich Mean Time). The valid range forhh:mmis -12:00 to +14:00. -
Specify
LOCALto set the default local time zone offset of the current SQL session to the original default local time zone offset that was established when the current SQL session was started. -
Specify
DBTIMEZONEto set the current session time zone to match the value set for the database time zone. If you specify this setting, then theDBTIMEZONEfunction will return the database time zone as a UTC offset or a time zone region, depending on how the database time zone has been set. -
Specify a valid
time_zone_region. To see a listing of valid region names, query theTZNAMEcolumn of theV$TIMEZONE_NAMESdynamic performance view. If you specify this setting, then theSESSIONTIMEZONEfunction will return the region name.
Note:
Timezone region names are needed by the daylight savings feature. The region names are stored in two time zone files. The default time zone file is a small file containing only the most common time zones to maximize performance. If your time zone is not in the default file, then you will not have daylight savings support until you provide a path to the complete (larger) file by way of theORA_TZFILE environment variable.
本文深入探讨了SQL中TIME_ZONE参数的使用,包括其语法、设置方法及常见值,如'os'、'local'、'时间偏移'、'dbtimezone'和特定地区名,帮助理解如何根据不同需求调整SQL会话的时间区。
530

被折叠的 条评论
为什么被折叠?



