Hi all,
I have a brief question about comparing CLOBs.
I have not worked with clobs or blobs very much and have recently been reading the clob comparison rules section of the following:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_plsql_semantics.htm#sthref855
my question is, what is the difference between comparing a clob with another clob using the equals or not equals symbols and using dbms_lob.compare:
Database Version: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
Database Version: PL/SQL Release 10.2.0.5.0 - Production
begin
select *
into val1, val2
from foo;
if val1 = val2 then
dbms_output.put_line('equal');
else
dbms_output.put_line('not equal');
end if;
if dbms_lob.compare(val1,val2) = 0 then
dbms_output.put_line('dbms_lob.compare equal');
else
dbms_output.put_line('dbms_lob.compare not equal');
end if;
end;
The above appears to give the same result for both regardless of how long the clob is (I've tried values up to 3mb)
What am I missing?