Oracle 5.0 Reference Manual page 909

Table of Contents

Advertisement

argument is a constant string and the second is a column of type SET, the
function is optimized to use bit arithmetic. Returns
empty string. Returns
first argument contains a comma (",") character.
mysql>
SELECT FIND_IN_SET('b','a,b,c,d');
-> 2
[889]
FORMAT(X,D)
Formats the number
the result as a string. If
constant value.
mysql>
SELECT FORMAT(12332.123456, 4);
-> '12,332.1235'
mysql>
SELECT FORMAT(12332.1,4);
-> '12,332.1000'
mysql>
SELECT FORMAT(12332.2,0);
-> '12,332'
[889],
HEX(str)
HEX(N)
For a string argument str,
where each character in
performed by the
UNHEX()
For a numeric argument N,
of
treated as a longlong (BIGINT) number. This is equivalent to
N
inverse of this operation is performed by
mysql>
SELECT 0x616263, HEX('abc'), UNHEX(HEX('abc'));
-> 'abc', 616263, 'abc'
mysql>
SELECT HEX(255), CONV(HEX(255),16,10);
-> 'FF', 255
INSERT(str,pos,len,newstr)
Returns the string str, with the substring beginning at position
replaced by the string newstr. Returns the original string if
Replaces the rest of the string from position
string. Returns
NULL
mysql>
SELECT INSERT('Quadratic', 3, 4, 'What');
-> 'QuWhattic'
mysql>
SELECT INSERT('Quadratic', -1, 4, 'What');
-> 'Quadratic'
mysql>
SELECT INSERT('Quadratic', 3, 100, 'What');
-> 'QuWhat'
This function is multi-byte safe.
INSTR(str,substr)
Returns the position of the first occurrence of substring
the two-argument form of
mysql>
SELECT INSTR('foobarbar', 'bar');
-> 4
mysql>
SELECT INSTR('xbar', 'foobar');
-> 0
This function is multi-byte safe, and is case sensitive only if at least one argument is a binary string.
[889]
LCASE(str)
String Functions
if either argument is NULL. This function does not work properly if the
NULL
to a format like '#,###,###.##', rounded to
X
is 0, the result has no decimal point or fractional part.
D
[889]
[889]
returns a hexadecimal string representation of
HEX()
is converted to two hexadecimal digits. The inverse of this operation is
str
[895]
function.
[889]
returns a hexadecimal string representation of the value
HEX()
CONV(HEX(N),16,10)
[889]
if any argument is NULL.
[889]
[890], except that the order of the arguments is reversed.
LOCATE()
889
if
is not in
0
str
CONV(N,10,16)
[909].
pos
is not within the length of the string.
pos
if
is not within the length of the rest of the
pos
len
in string str. This is the same as
substr
FIND_IN_SET()
or if
strlist
strlist
decimal places, and returns
D
should be a
D
str
[909]. The
and
characters long
len
[888]
is the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents