转自ASKTOM

You Asked

What's the different between null and empty_clob()? And, is a null represented different for a clob then a varchar?

create table tt1(n1 number, c1 varchar2(1), b1 clob)

insert into tt1 values(1, null, null)

insert into tt1 values(2, null, empty_clob())

select * from tt1

If I do this in TOAD, for example, it knows c1 is null and shows "{null}", but for b1 it does not. (I know TOAD may do things different then SQLplus, but it raised the question in my mind.)

Thanks,
Steve

and we said...

a NULL is the absence of a value - nothing

an empty_clob() is a value - it is not null, it is just "empty", no data in it yet.

The empty_clob() is not NULL, it is an empty clob of length zero.

sort of like this:


[tkyte@tkyte-pc ~]$ ls empty_clob
ls: empty_clob: No such file or directory
[tkyte@tkyte-pc ~]$ touch empty_clob
[tkyte@tkyte-pc ~]$ ls empty_clob
empty_clob
[tkyte@tkyte-pc ~]$