Oracle function Daquan 2 [resend]

Source: Internet
Author: User

15. Abs
Returns the absolute value of a specified value.
SQL> select ABS (100), ABS (-100) from dual;

ABS (100) ABS (-100)
------------------
100 100

16. ACOs
Returns the arc cosine value.
SQL> select ACOs (-1) from dual;

ACOs (-1)
---------
3.1415927

17. Asin
Returns the arcsin value.
SQL & gt; select asin (0.5) from dual;

Asin (0.5)
---------
. 52359878

18. atan
Returns the arc tangent of a number.
SQL> select atan (1) from dual;

Atan (1)
---------
. 78539816

19. ceil
Returns the smallest integer greater than or equal to the given number.
SQL> select Ceil (3.1415927) from dual;

Ceil (3.1415927)
---------------
4

20. Cos
Returns the cosine of a given number.
SQL> select cos (-3.1415927) from dual;

Cos (-1, 3.1415927)
---------------
-1

21. cosh
Returns the arc cosine of a number.
SQL> select cosh (20) from dual;

Cosh (20)
---------
242582598

22. Exp
Returns the n root of the number E.
SQL> select exp (2), exp (1) from dual;

Exp (2) exp (1)
------------------
7.3890561 2.7182818

23. Floor
Returns an integer to a given number.
SQL> select floor (2345.67) from dual;

Floor (2345.67)
--------------
2345

24. ln
Returns the logarithm of a number.
SQL> select ln (1), Ln (2), Ln (2.7182818) from dual;

Ln (1) ln (2) ln (1, 2.7182818)
-------------------------------
0. 69314718. 99999999

25. Log (N1, N2)
Returns the base N2 logarithm of N1.
SQL> Select log (2, 1), log (2, 4) from dual;

Log (2, 1) log (2, 4)
------------------
0 2

26. Mod (N1, N2)
Returns the remainder of N1 divided by N2.
SQL> select Mod (10, 3), MOD (3, 3), MOD (2, 3) from dual;

MoD () mod)
---------------------------
1 0 2

27. Power
Returns the N2 root of N1.
SQL> select power (2, 10), power (3, 3) from dual;

Power (2, 10) power (3, 3)
---------------------
1024 27

28. Round and trunc
Round according to the specified precision
SQL> select round (55.5), round (-55.4), trunc (55.5), trunc (-55.5) from dual;

Round (55.5) round (-55.4) trunc (55.5) trunc (-55.5)
----------------------------------------------
56-55 55-55

29. Sign
Returns 1 if the number N is greater than 0,-1 if the value is less than 0, and 0 if the value is 0.
SQL> select sign (123), sign (-100), sign (0) from dual;

Sign (123) sign (-100) Sign (0)
----------------------------
1-1 0

30. Sin
Returns the sine of a number.
SQL> select sin (1.57079) from dual;

Sin (1.57079)
------------
1

31. Sigh
Returns the hyperbolic sine value.
SQL> select sin (20), sinh (20) from dual;

Sin (20) sinh (20)
------------------
.. 91294525 242582598

32. SQRT
Returns the root of number n.
SQL> select SQRT (64), SQRT (10) from dual;

SQRT (64) SQRT (10)
------------------
8 3.1622777

33. Tan
Returns the tangent of a number.
SQL> select Tan (20), Tan (10) from dual;

Tan (20) Tan (10)
------------------
2.2371609. 64836083

34. Tanh
Returns the hyperbolic tangent of number n.
SQL> select Tanh (20), Tan (20) from dual;

Tanh (20) Tan (20)
------------------
1 2.2371609

 

35. trunc
Truncate a number based on the specified precision
SQL> select trunc (124.1666,-2) trunc1, trunc (124.16666, 2) from dual;

Trunc1 trunc (124.16666, 2)
---------------------------
100 124.16

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.