| Oracle® Objects for OLE Developer's Guide 11g Release 2 (11.2) for Microsoft Windows Part Number E17727-03 | 
 | 
| 
 | PDF · Mobi · ePub | 
Compares the specified portion of the LOB value of an OraBLOB or OraCLOB object (or OraBFILE object) to the LOB value of the input OraBLOB or OraCLOB object (or OraBFILE object).
IsEqual = OraBlob.Compare srcBlob, amount, Offset, srcOffset IsEqual = OraClob.Compare srcClob, amount, Offset, srcOffset IsEqual = OraBfile.Compare srcBfile, amount, Offset, srcOffset
The arguments for the method are:
| Arguments | Description | 
|---|---|
| [ in]srcLOB | Input OraBLOB,OraCLOB, orOraBFILEobject whose value is to be compared. | 
| [ in] [optional]amount | An Integerspecifying the number of bytes or characters to compare. The default value ofamountis from theOffsetto the end of each LOB. | 
| [ in] [optional]Offset | An Integerspecifying the1-basedOffsetin bytes (OraBLOBorOraBFILE) or characters (OraCLOB) in the value of this object. Default value is1. | 
| [ in] [optional]srcOffset | An Integerspecifying the1-basedOffsetin bytes (OraBLOBorOraBFILE) or characters (OraCLOB) in the value of thesrcLobobject. Default value is1. | 
| [ out]IsEqual | A Boolean representing the result of a compare operation. | 
The Compare method returns True if comparison succeeds; otherwise, it returns False.
If the amount to be compared causes the comparison to take place beyond the end of one LOB but not beyond the end of the other, the comparison fails. Such a comparison could succeed only if the amount of data from the Offset to the end is the exactly the same for both LOBs.
This call is currently implemented by executing a PL/SQL block that utilizes DBMS_LOB.INSTR().