5.1 SQL Functions and Operators Supported for Use with LOBs
Many SQL operators and functions that take VARCHAR2
columns as arguments, also accept LOB columns. The following list summarizes those categories of SQL functions and operators that are supported for use with LOBs.
SQL Operations/ Functions | Support |
---|---|
Concatenation | Supported |
Comparison | Some comparison functions are not supported for LOBs |
Character functions | Supported |
Conversion | Some conversion functions are not supported for LOBs |
Aggregate functions | Not supported |
Unicode functions | Not supported |
The following table provides the details on each of the operations that accept VARCHAR2
types as operands or arguments, or return a VARCHAR2
value.
- The SQL column identifies the built-in functions and operators that are
supported for
CLOB
andNCLOB
data types. TheLENGTH
function is also supported for theBLOB
data type. - The PL/SQL column identifies the PL/SQL built-in functions and operators that are supported on LOBs.
- Functions designated as CNV in the SQL or PL/SQL column in the table
are performed by converting the
CLOB
to a character data type, such asVARCHAR2
. In the SQL environment, only the first 4K bytes of theCLOB
are converted and used in the operation. In the PL/SQL environment, only the first 32K bytes of theCLOB
are converted and used in the operation.
Table 5-1 SQL VARCHAR2 Functions and Operators on LOBs
Category | Operator / Function | SQL Example / Comments | SQL | PL/SQL |
---|---|---|---|---|
Concatenation |
|
|
Yes |
Yes |
Comparison |
|
|
No |
Yes |
Comparison |
|
|
No |
Yes |
Comparison |
|
|
No |
N/A |
Comparison |
|
|
No |
Yes |
Comparison |
|
|
Yes |
Yes |
Comparison |
|
|
Yes |
Yes |
Character Functions |
|
|
CNV |
CNV |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
CNV |
CNV |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
CNV |
CNV |
Character Functions |
|
|
CNV |
CNV |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
Yes |
Yes |
Character Functions |
|
|
CNV |
CNV |
Character Functions |
|
These functions are supported only for
|
Yes |
Yes |
Character Functions - Regular Expressions |
|
This function searches a character column for a pattern.
Use this function in the |
Yes |
Yes |
Character Functions - Regular Expressions |
|
This function searches for a pattern in a character column and replaces each occurrence of that pattern with the pattern you specify. |
Yes |
Yes |
Character Functions - Regular Expressions |
|
This function searches a string for a given occurrence of a regular expression pattern. You specify which occurrence you want to find and the start position to search from. This function returns an integer indicating the position in the string where the match is found. |
Yes |
Yes |
Character Functions - Regular Expressions |
|
This function returns the actual substring matching the regular expression pattern you specify. |
Yes |
Yes |
Conversion |
|
|
CNV |
CNV |
Conversion |
|
Returns a Unicode string given a string in the data type |
CNV |
CNV |
Conversion |
|
Valid for Unicode character arguments. |
CNV |
CNV |
Conversion |
|
|
No |
CNV |
Conversion |
|
|
Yes |
CNV |
Conversion |
|
|
CNV |
CNV |
Conversion |
|
|
CNV |
CNV |
Conversion |
|
|
No |
CNV |
Conversion |
|
|
CNV |
CNV |
Conversion |
|
|
Yes |
Yes |
Conversion |
|
|
Yes |
Yes |
Conversion |
|
Note that |
N/A |
N/A |
Conversion |
|
|
Yes |
Yes |
Conversion |
|
|
Yes |
Yes |
Aggregate Functions |
|
|
No |
N/A |
Aggregate Functions |
|
|
No |
N/A |
Aggregate Functions |
|
|
No |
N/A |
Other Functions |
|
|
No |
CNV |
Other Functions |
|
|
CNV |
CNV |
Other Functions |
|
|
Yes |
Yes |
Other Functions |
|
|
No |
N/A |
Other Functions |
|
|
No |
N/A |
Unicode |
|
These functions use UCS2 code point semantics. |
No |
CNV |
Unicode |
|
These functions use UCS4 code point semantics. |
No |
CNV |
Unicode |
|
These functions use complete character semantics. |
No |
CNV |
See Also:
- Oracle Database SQL Language Reference for syntax details on SQL functions for regular expressions.
- Oracle Database Development Guide for information on using regular expressions with the database.