string || string |
CLOB |
String concatenation |
'Polar' || 'DB' |
PolarDB |
CONCAT(string, string) |
CLOB |
String concatenation |
CONCAT('a' || 'b') |
ab |
HEXTORAW(varchar2) |
RAW |
Converts a VARCHAR2 value to a RAW value |
HEXTORAW('303132') |
'012' |
RAWTOHEX(raw) |
VARCHAR2 |
Converts a RAW value to a HEXADECIMAL value |
RAWTOHEX('012') |
'303132' |
INSTR(string, set, [ start [, occurrence ] ]) |
INTEGER |
Finds the location of a set of characters in a string, starting at position start
in the string, string, and looking for the first, second, third and so on occurrences
of the set. Returns 0 if the set is not found.
|
INSTR('PETER PIPER PICKED a PECK of PICKLED PEPPERS','PI',1,3) |
30 |
INSTRB(string, set, start) |
INTEGER |
Returns the position of the set within the string, beginning at start. Returns 0 if
set is not found.
|
INSTRB('PETER PIPER PICKED a PECK of PICKLED PEPPERS','PICK', 14) |
30 |
INSTRB(string, set, start, occurrence) |
INTEGER |
Returns the position of the specified occurrence of set within the string, beginning
at start. Returns 0 if set is not found.
|
INSTRB('PETER PIPER PICKED a PECK of PICKLED PEPPERS','PICK', 1, 2) |
30 |
LOWER(string) |
CLOB |
Convert string to lower case |
LOWER('TOM') |
tom |
SUBSTR(string, start [, count ]) |
CLOB |
Extract substring starting from start and going for count characters. If count is
not specified, the string is clipped from the start till the end.
|
SUBSTR('This is a test',6,2) |
is |
SUBSTRB(string, start [, count ]) |
CLOB |
Same as SUBSTR except start and count are in number of bytes. |
SUBSTRB('abc',3) (assuming a double-byte character set) |
c |
SUBSTR2(string, start[, count ]) |
CLOB |
Alias for SUBSTR. |
SUBSTR2('This is atest',6,2) |
is |
SUBSTR2(string, start [, count ]) |
CLOB |
Alias for SUBSTRB. |
SUBSTR2('abc',3) (assuming a double-byte character set) |
c |
SUBSTR4(string, start [, count ]) |
CLOB |
Alias for SUBSTR. |
SUBSTR4('This is a test',6,2) |
is |
SUBSTR4(string, start [, count ]) |
CLOB |
Alias for SUBSTRB. |
SUBSTR4('abc',3) (assuming a double-byte character set) |
c |
SUBSTRC(string, start [, count ]) |
CLOB |
Alias for SUBSTR. |
SUBSTRC('This is a test',6,2) |
is |
SUBSTRC(string, start [, count ]) |
CLOB |
Alias for SUBSTRB. |
SUBSTRC('abc',3) (assuming a double-byte character set) |
c |
TRIM([ LEADING | TRAILING | BOTH ] [ characters ] FROM string) |
CLOB |
Remove the longest string containing only the characters (a space by default) from
the start/end/both ends of the string.
|
TRIM(BOTH 'x' FROM 'xTomxx') |
Tom |
LTRIM(string [, set]) |
CLOB |
Removes all the characters specified in set from the left of a given string. If set
is not specified, a blank space is used as default.
|
LTRIM('abcdefghi', 'abc') |
defghi |
RTRIM(string [, set]) |
CLOB |
Removes all the characters specified in set from the right of a given string. If set
is not specified, a blank space is used as default.
|
RTRIM('abcdefghi', 'ghi') |
abcdef |
UPPER(string) |
CLOB |
Convert string to upper case |
UPPER('tom') |
TOM |