暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oracle和ORA-30088的时间戳: 日期时间/间隔精度超出范围

askTom 2018-03-01
2136

问题描述

嗨,汤姆

我正在尝试存储时间戳如下。

Timstmp(12)
YYYY-MM-DD-hh.mm.ss.nnnnnnnnnnnn

所以我试图创建如下表。

create table t23
    (ts0 timestamp(0)
     , ts3 timestamp(3)
    , ts6 timestamp(6)
    ,  ts12 timestamp(12)
);

ORA-30088: datetime/interval precision is out of range
30088. 00000 -  "datetime/interval precision is out of range"
*Cause:    The specified datetime/interval precision was not between 0 and 9.
*Action:   Use a value between 0 and 9 for datetime/interval precision.
复制


因为ts12时间戳 (12) 给出了错误。请帮帮忙。

专家解答

这个错误对我来说似乎很清楚:

The specified datetime/interval precision was not between 0 and 9

所以你不能有一个时间戳 (12)。Timestamp(9) 是您可以拥有的最大精度。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论