Difference between revisions of "SQL Numeric operators"
From Lianjapedia
Helen.george (Talk | contribs) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Numeric operators | Numeric operators | ||
− | |||
==Syntax== | ==Syntax== | ||
<expression1> operator <expression2>[ operator <expression3>…] | <expression1> operator <expression2>[ operator <expression3>…] | ||
− | |||
==See Also== | ==See Also== | ||
[[SQL INSERT|INSERT]], [[SQL OPERATORS|OPERATORS]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]] | [[SQL INSERT|INSERT]], [[SQL OPERATORS|OPERATORS]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]] | ||
− | |||
==Description== | ==Description== | ||
Operators used with Numeric expressions: | Operators used with Numeric expressions: | ||
− | + | {| class="wikitable" width="100%" | |
− | + | ||
− | {| class="wikitable" | + | |
!Operator||Operation | !Operator||Operation | ||
|- | |- | ||
Line 32: | Line 27: | ||
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 47: | Line 41: | ||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL|Operators,Numeric]] | [[Category:SQL|Operators,Numeric]] |
Latest revision as of 11:36, 30 January 2013
Contents
Purpose
Numeric operators
Syntax
<expression1> operator <expression2>[ operator <expression3>…]
See Also
INSERT, OPERATORS, SELECT, UPDATE
Description
Operators used with Numeric expressions:
Operator | Operation |
---|---|
** | Exponentiation |
* | Multiplication |
/ | Division |
% | Modulus/Remainder |
+ | Addition |
- | Subtraction |
Example
SELECT name, address, balance, cost*1.15; FROM accounts; WHERE paid_date < date() AND ord_value > 10000; ORDER BY name, paid_date SELECT account_no, ord_value – paid_value as "Outstanding Balance"; FROM accounts; ORDER BY account_no