Function |
Description |
Example |
substr(src, p, l) |
Returns a portion of src starting at position p and l char. long |
substr('Hello',3,2) = 'll' |
upper |
Converts to uppercase |
upper('Hello') = 'HELLO' |
lower |
Converts to lowercase |
lower('HELLO') = 'hello' |
initcap |
Capitalizes the first character or each word |
initcap('HELLO, world!') = 'Hello, World!' |
ltrim |
Removes blanks at the left-end of a string |
ltrim(' Hello ') = 'Hello ' |
rtrim |
Removes blanks at the right-end of a string |
rtrim(' Hello' ) = ' Hello' |
trim |
Removes blanks at either ends of a string |
trim(' Hello ') = 'Hello' |
concat |
Concatenates two strings |
concat('Hel', 'lo') = 'Hello' |
length |
Returns the length of a string |
length('Hello') = 5 |
replace(src, x, y) |
Replaces every occurrence of x in src by y (or by nothing if y is absent) |
replace('Hello', 'll', 'r') = 'Hero'
replace('Hello', 'o') = 'Hell'
|
lpad(src, l, p) |
Returns src, left-padded to length n with the string p |
lpad('Hello', 10, '>') = '>>>>>Hello' |
rpad(src, l, p) |
Returns src, right-padded to length n with the string p |
rpad('Hello', 10, '!') = 'Hello!!!!!' |
chr |
Returns a character's code |
chr('H') = 72 |
soundex |
Computes the soundex phonetic value of a string |
|
translate |
Replaces each char. from x in src by the corresponding char. in y |
translate('hello', 'hl', 'HL') = 'HeLLo' |
nls_initcap |
Same as initcap with National Language Support (NLS) |
|
nls_upper |
Same as upper with National Language Support (NLS) |
nls_upper('Café) = CAFÉ |
nls_lower |
Same as lower with National Language Support (NLS) |
|