Oracle value functions

Source: Internet
Author: User

Oracle value functions

1. absolute value: abs () select abs (-2) value from dual; 2. take the entire function (large): ceil () select ceil (-2.001) value from dual; (-2) 3. take the entire function (small): floor () select floor (-2.001) value from dual; (-3) 4. take the entire function (truncation): trunc () select trunc (-2.001) value from dual; (-2) 5. rounding: round () select round (1.234564) value from dual; (1.2346) 6. take the square: Power (m, n) select power () value from dual; (16) 7. take the square root: SQRT () select sqrt (16) value from dual; (4) 8. random Number: dbms_random (minvalue, maxvalue) select sys. dbms. random. value (0, 1) value from dual; 9. sign: sign () select Sign (-3) value from dual; (-) 10, take the maximum value of the set: greatest (value) select greatest (-1, 3, 5, 7, 9) value from dual; (9) 11. take the minimum value of the set: least (value) select least (-, 9) value from dual; (-1) 12. processing Null values: nvl (null value, replace value) select nvl (Null, 10) value from dual; (10) 13. evaluate the Character Sequence Number: ascii () select ascii (a) value from dual; 14. evaluate the sequence number character: chr () select chr (97) value from dual; 15. link: concat () select concat ("11", "22") value from dual; (1122) 16. obtain the system time: sysdate () select sysdate value from dual; 17. evaluate the date select trunc (sysdate) from dual; 18. evaluate the time select to_char (sysdate, "hh24: mm: ss") from dual; 19. uppercase letters: InitCAP () select INITCAP (abc def ghi) value from dual; (Abc Def Ghi)

 


Related Article

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.