Oracle 5.0 Reference Manual page 910

Table of Contents

Advertisement

[889]
is a synonym for
LCASE()
[890]
LEFT(str,len)
Returns the leftmost
mysql>
SELECT LEFT('foobarbar', 5);
-> 'fooba'
This function is multi-byte safe.
[890]
LENGTH(str)
Returns the length of the string str, measured in bytes. A multi-byte character counts as multiple
bytes. This means that for a string containing five 2-byte characters,
whereas
CHAR_LENGTH()
mysql>
SELECT LENGTH('text');
-> 4
LOAD_FILE(file_name)
Reads the file and returns the file contents as a string. To use this function, the file must be located
on the server host, you must specify the full path name to the file, and you must have the
privilege. The file must be readable by all and its size less than
If the
secure_file_priv
loaded must be located in that directory.
If the file does not exist or cannot be read because one of the preceding conditions is not satisfied,
the function returns NULL.
As of MySQL 5.0.19, the
interpretation of file names that are given as literal strings.
mysql>
UPDATE t
SET blob_col=LOAD_FILE('/tmp/picture')
WHERE id=1;
LOCATE(substr,str)
The first syntax returns the position of the first occurrence of substring
second syntax returns the position of the first occurrence of substring
at position pos. Returns
mysql>
SELECT LOCATE('bar', 'foobarbar');
-> 4
mysql>
SELECT LOCATE('xbar', 'foobar');
-> 0
mysql>
SELECT LOCATE('bar', 'foobarbar', 5);
-> 7
This function is multi-byte safe, and is case-sensitive only if at least one argument is a binary string.
[890]
LOWER(str)
Returns the string
str
set mapping. The default is
mysql>
SELECT LOWER('QUADRATICALLY');
-> 'quadratically'
[890]
(and
LOWER()
VARBINARY, BLOB). To perform lettercase conversion, convert the string to a nonbinary string:
String Functions
[890].
LOWER()
characters from the string str, or
len
[887]
returns 5.
[890]
[490]
system variable is set to a nonempty directory name, the file to be
character_set_filesystem
[890],
LOCATE(substr,str,pos)
if
is not in str.
0
substr
with all characters changed to lowercase according to the current character
(cp1252 West European).
latin1
[895]) are ineffective when applied to binary strings (BINARY,
UPPER()
890
if any argument is NULL.
NULL
[890]
LENGTH()
max_allowed_packet
[442]
system variable controls
[890]
in string str. The
substr
in string str, starting
substr
returns 10,
[577]
FILE
[466]
bytes.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents