operator meaning
· + (PLUS) Addition | | (plus) string addition · -(minus) subtraction · * (multiply) multiplication · /(Divide) Division · MoD (modulo) returns the integer remainder of a division
For example, 12 5 = 2, which is because 12 is divided by 5 and the remainder is 2
Example:
Select5+6,5+
NULL
fromDual
Select5-6
fromDual
Select5*6
fromDual
Select5/6
fromDual
Selectmod(13,3)
fromDual
Calculation of columns:
Select field A + Field B form table Select field a*2 form table Power (2,3): 2 3 times
Round (values, decimal digits): 4 in 5
Floor: Fractional part directly discarded, integer unchanged
Ceil: Fractional part directly discarded, integer +1
--2*2*2*2
SelectPower (2,4)
fromDual
--Problem (understanding): Ask for value after 8 open root 3
--a*a*a=8,a=?
SelectPower (8,1/3)
fromDual
--Rounding:
--The decimal place is 0, which means that after rounding, an integer is returned
SelectRound (0.49)
fromDual
SelectRound (0.5)
fromDual
--Keep 2 decimal places
SelectRound (0.33333,2)
fromDual
--floor: The fractional part is discarded directly and the integer is unchanged
SelectFloor (10.9)
fromDual
--ceil: Fractional part directly discarded, integer +1
SelectCeil (10.1)
fromDual
Calculation of numerical values in Oracle