![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_1646196925.webp)
Arithmetic Operators
905
Name
Description
LOG()
[910]
Return the natural logarithm of the first argument
-
[906]
Minus operator
MOD()
[911]
Return the remainder
% or MOD
[907]
Modulo operator
PI()
[911]
Return the value of pi
+
[906]
Addition operator
POW()
[912]
Return the argument raised to the specified power
POWER()
[912]
Return the argument raised to the specified power
RADIANS()
[912]
Return argument converted to radians
RAND()
[912]
Return a random floating-point value
ROUND()
[913]
Round the argument
SIGN()
[914]
Return the sign of the argument
SIN()
[914]
Return the sine of the argument
SQRT()
[914]
Return the square root of the argument
TAN()
[914]
Return the tangent of the argument
*
[906]
Multiplication operator
TRUNCATE()
[914]
Truncate to specified number of decimal places
-
[906]
Change the sign of the argument
12.6.1. Arithmetic Operators
Table 12.11. Arithmetic Operators
Name
Description
DIV
[907]
Integer division
/
[906]
Division operator
-
[906]
Minus operator
% or MOD
[907]
Modulo operator
+
[906]
Addition operator
*
[906]
Multiplication operator
-
[906]
Change the sign of the argument
The usual arithmetic operators are available. The result is determined according to the following rules:
• In the case of
-
[906]
,
+
[906]
, and
*
[906]
, the result is calculated with
BIGINT
(64-bit)
precision if both operands are integers.
• If both operands are integers and any of them are unsigned, the result is an unsigned integer. For
subtraction, if the
NO_UNSIGNED_SUBTRACTION
[537]
SQL mode is enabled, the result is signed
even if any operand is unsigned.
• If any of the operands of a
+
[906]
,
-
[906]
,
/
[906]
,
*
[906]
,
%
[907]
is a real or string value,
the precision of the result is the precision of the operand with the maximum precision.
• In division performed with
/
[906]
, the scale of the result when using two exact-value operands
is the scale of the first operand plus the value of the
div_precision_increment
[449]
system
variable (which is 4 by default). For example, the result of the expression
5.05 / 0.014
has a
scale of six decimal places (
360.714286
).
Содержание 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 ...