Oracle mathematical functions are not the same as those in SQL Server. The following describes the differences between Oracle mathematical functions and SQL Server mathematical functions.
① Absolute value
S: select abs (-1) value
O: select abs (-1) value from dual
② INTEGER (large)
S: select ceiling (-001) value
O: select ceil (-001) value from dual
③ Rounded up)
S: select floor (-001) value
O: select floor (-001) value from dual
④ Integer truncation)
S: select cast (-002 as int) value
O: select trunc (-002) value from dual
⑤ Rounding
S: select round (23456,4) value 23460
O: select round (23456,4) value from dual 2346
⑥ E is the base power
S: select Exp (1) value
O: select Exp (1) value from dual
7. Take the base logarithm of e.
S: select log (7182818284590451) value
O: select ln (7182818284590451) value from dual;
Returns the base 10 logarithm of a shard.
S: select log10 (10) value
O: select log (10, 10) value from dual;
Returns the square of a shard.
S: select SQUARE (4) value
O: select power (4, 2) value from dual
Returns the square root of a shard.
S: select SQRT (4) value
O: select SQRT (4) value from dual
Evaluate the base power of any number
S: select power (3, 4) value
O: select power (3, 4) value from dual
Random Number
S: select rand () value
O: select sys. dbms_random.value (0, 1) value from dual;
Get the symbol
S: select sign (-8) value-1
O: select sign (-8) value from dual-1
The preceding section describes the differences between Oracle and SQL mathematical functions.
Oracle Pipeline Function usage
Oracle TRIM function syntax
Oracle date functions
Introduction to Oracle System Variable Functions
Provides you with an in-depth understanding of Oracle triggers