Oracle9i Application Developer's Guide - Large Objects (LOBs) Release 1 (9.0.1) Part Number A88879-01 |
|
Modeling and Design, 18 of 21
Like VARCHAR2s, when a CLOB is compared with another CLOB or compared with a VARCHAR2, a set of rules determines the comparison. The rules are usually called a "collating sequence". In Oracle, CHARs and VARCHAR2s have slightly different sequences due to the blank padding of CHARs.
As a rule, CLOBs follow the same collating sequence as VARCHAR2s. That is, when a CLOB is compared, the result is consistent with if the CLOB data content is retrieved into a VARCHAR2 buffer and the VARCHAR2 is compared. The rule applies to all cases including comparisons between CLOB and CLOB, CLOB and VARCHAR2, and CLOB and CHAR.
When the database character set is varying-width, VARCHAR2s and CLOBs differ as follows:
To compare CLOB and VARCHAR2s in a varying-width database follow this procedure:
It makes no sense to compare CLOBs with non-character data, or with BLOBs. An error is returned in these cases.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|