SQL> select tp from timestamp_test; TP -------------------------------------------------------------------------------- 01-3月 -16 09.22.33.000000 上午
SQL> select tp_tz from timestamp_test; TP_TZ -------------------------------------------------------------------------------- 01-3月 -16 09.22.33.000000 上午 +08:00
SQL> select tp_l_tz from timestamp_test; TP_L_TZ -------------------------------------------------------------------------------- 01-3月 -16 09.22.33.000000 上午
# 创建timestamp_test测试表 SQL> create table timestamp_test(dt date,tp timestamp(6),tp_tz timestamp(6) with time zone,tp_l_tz timestamp(6) with local time zone); Table created # 在测试表中添加数据 SQL> insert into timestamp_test values(sysdate,sysdate,sysdate,sysdate); 1 row inserted SQL> commit; Commit complete # 查看数据库的时区和当前会话的时区 SQL> select dbtimezone,sessiontimezone from dual; DBTIMEZONE SESSIONTIMEZONE ---------- --------------------------------------------------------------------------- +00:00 +08:00 # 查看当前时间 SQL> select sysdate from dual; SYSDATE ----------- 2016/3/1 9: # 查看测试表的数据 SQL> select * from timestamp_test; DT TP TP_TZ TP_L_TZ ----------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- 2016/3/1 9: 01-3月 -16 09.22.33.000000 上午 01-3月 -16 09.22.33.000000 上午 +08:00 01-3月 -16 09.22.33.000000 上午 # 修改当前会话的时区 SQL> alter session set time_zone='+10:00'; Session altered # 查看当前会话时区修改后的测试表的数据 SQL> select dbtimezone,sessiontimezone from dual; DBTIMEZONE SESSIONTIMEZONE ---------- --------------------------------------------------------------------------- +00:00 +10:00 SQL> select * from timestamp_test; DT TP TP_TZ TP_L_TZ ----------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- 2016/3/1 9: 01-3月 -16 09.22.33.000000 上午 01-3月 -16 09.22.33.000000 上午 +08:00 01-3月 -16 11.22.33.000000 上午 Oracle的备份与恢复
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有