如何在oracle中的十进制列中插入空值或空值?

How to insert null or empty value to decimal column in oracle?

如果它是字符串列,我可以使用 '' 插入 null 或空值,但是小数列 Null-99999 呢?非常感谢您的任何建议。

您可以将空值插入到具有列类型整数的 table 中。 Empty_string 和 null 在 oracle 中是一样的。

例如:

create table t(x int)

insert into t values('')
insert into t values(null)

select count(*),count(x)
  from t

https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=e7653cf554a9e19a8ae47f1c101218ff

NULL 只是缺少或不可用的值。

您可以在数据库中任何允许为空的列中插入空值,无论其数据类型如何。对于 string ''(空值)被认为是 nullnumber.

没有这样的东西
Create table test
(id number,
Name varchar2(10),
Address clob,
Zip integer);

Insert into test
Values(NULL, NULL, NULL, NULL)

干杯!!

您不能插入空值 (''),这将引发以下错误,您可以插入 NULL 个值。

converting data type varchar to numeric.

INSERT INTO TBL (DeciClm) VALUES(NULL)