NUMBER 的最小可能值是多少

What is the smallest possible value of NUMBER

我想知道默认数字列的最小可能值是多少。

我可以从 documentation 中看出默认精度是 number(38,0),因此我假设允许的最小值为

-9999999999999999999999999999999999999

但是文档没有具体说明限制是什么。

这是正确的吗?

你是对的,你可以插入的最小数字是:

-9999999999999999999999999999999999999

我试了一下,这是结果。

create temporary table test_db.public.test_table (col1 number);
insert into test_db.public.test_table values (-99999999999999999999999999999999999999); -- This works fine
insert into test_db.public.test_table values (-999999999999999999999999999999999999999); -- this errors

第二个精度为 39 的 SQL 从 Snowflake 中生成了以下错误消息:

SQL compilation error: Error line 1 at position 48 Integer literal is out of representable range: 999999999999999999999999999999999999999