Mathematical Functions
909
-> 1.5707963267949
•
CEIL(X)
[909]
CEIL()
[909]
is a synonym for
CEILING()
[909]
.
•
CEILING(X)
[909]
Returns the smallest integer value not less than
X
.
mysql>
SELECT CEILING(1.23);
-> 2
mysql>
SELECT CEILING(-1.23);
-> -1
For exact-value numeric arguments, the return value has an exact-value numeric type. For string or
floating-point arguments, the return value has a floating-point type.
•
CONV(N,from_base,to_base)
[909]
Converts numbers between different number bases. Returns a string representation of the number
N
, converted from base
from_base
to base
to_base
. Returns
NULL
if any argument is
NULL
. The
argument
N
is interpreted as an integer, but may be specified as an integer or a string. The minimum
base is
2
and the maximum base is
36
. If
to_base
is a negative number,
N
is regarded as a signed
number. Otherwise,
N
is treated as unsigned.
CONV()
[909]
works with 64-bit precision.
mysql>
SELECT CONV('a',16,2);
-> '1010'
mysql>
SELECT CONV('6E',18,8);
-> '172'
mysql>
SELECT CONV(-17,10,-18);
-> '-H'
mysql>
SELECT CONV(10+'10'+'10'+0xa,10,10);
-> '40'
•
COS(X)
[909]
Returns the cosine of
X
, where
X
is given in radians.
mysql>
SELECT COS(PI());
-> -1
•
COT(X)
[909]
Returns the cotangent of
X
.
mysql>
SELECT COT(12);
-> -1.5726734063977
mysql>
SELECT COT(0);
-> NULL
•
CRC32(expr)
[909]
Computes a cyclic redundancy check value and returns a 32-bit unsigned value. The result is
NULL
if
the argument is
NULL
. The argument is expected to be a string and (if possible) is treated as one if it
is not.
mysql>
SELECT CRC32('MySQL');
-> 3259397556
mysql>
SELECT CRC32('mysql');
-> 2501908538
•
DEGREES(X)
[909]
Returns the argument
X
, converted from radians to degrees.
mysql>
SELECT DEGREES(PI());
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...