标题: [20241009]oracle timestamp with time zone数据范例的存储.txt [打印本页] 作者: 宁睿 时间: 2024-10-9 19:26 标题: [20241009]oracle timestamp with time zone数据范例的存储.txt [20241009]oracle timestamp with time zone数据范例的存储.txt
--//放假前遇到的问题,开发在表中界说了几个timestamp with time zone的数据范例,及时更正对方的错误,完全没有利用如许的数据
--//范例。类似的问题我以前就遇到,好比全部应用程序的表凡是varchar2数据范例都被界说为nvarchar2数据范例,date数据范例都被
--//界说为timestamp数据范例.
2.测试:
SCOTT@book01p> create table t(id number,c1 timestamp(10) with time zone ,c2 timestamp(10));
create table t(id number,c1 timestamp(10) with time zone ,c2 timestamp(10))
*
ERROR at line 1:
ORA-30088: datetime/interval precision is out of range
--//timestamp 最高精度是9,输入10报错。
SCOTT@book01p> create table t(id number,c1 timestamp(9) with time zone ,c2 timestamp(9));
Table created.
insert into t values (1,sysdate,sysdate);
insert into t values (2,systimestamp,systimestamp);
commit ;