About MySQL string

xiaoxiao2021-03-06  47

A string is a character sequence consisting of multiple characters, surrounded by single quotes ("') or double-quotes (" ") characters. (But only single quotes can be used when running in ANSI mode).

E.g:

'a string'

"another string"

In a string, if a sequence has a special meaning, each sequence begins with a reverse slope symbol ("/"), called a escape character. MySQL identifies the following escape characters:

/ 0

A ASCII 0 (

NUL) characters.

/ '

A ASCII 39 single quotes (

"'") Character.

/ "

A ASCII 34 double quotes (

"" ") Characters.

/ B

An ASCII 8 escape.

/ N

An ASCII 10 wrap.

/ r

An ASCII 13 carrier.

/ t

A ASCII 9 player (

Tab).

/z

ASCII (26) (Control-Z). This character can be handled in the Windows system ASCII (26) represents the end of a file. (When used

ASCII (26) may cause problems when mysql database

//

A ASCII 92 anti-oblique line (

"/") Characters.

/%

A ASCII 37

"%" Characters. It is used in the body search

"%" Text instance, otherwise here

"%" Will be interpreted as a wildcard. A ASCII 95

"_" Characters. It is used in the body search

"_" Text instance, otherwise here

"_" Will be explained as a wildcard.

Note If you use "/%" or "/ _" in some text-environments, strings "/%" and "/ _" are returned instead of "%" and "_".

转载请注明原文地址:https://www.9cbs.com/read-53328.html

New Post(0)