Differences between Oracle and SQL mathematical functions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.