Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to write integer statements with sql
How to write integer statements with sql
1. Absolute value

SQL: Select abs(- 1) value.

O: select abs(- 1) value from dual.

2. Round (large)

S: Select the upper limit (-1.00 1) value.

O: select the value of ceil(- 1.00 1) from dual.

3. Round (small)

S: select the lower limit (-1.00 1) value.

O: select the bottom value from dual (-1.00 1).

4. Rounding (Truncation)

S: select the value of cast(- 1.002 as int).

O: select trunc(- 1.002) value from dual.

round up or down

S: select round (1.23456,4) value 1.23460.

O: select the value of round (1.2346,4) from dual/kloc-0.