Oracle single row function classification

Source: Internet
Author: User

Oracle single row function classification single row function is mainly divided into five types: character (VARCHAR2) function, NUMBER function, DATE function,
The conversion function www.2cto.com is mainly used to operate string data, for example :. UPPER (string and column): converts the input string into uppercase and returns the result ;. LOWER (string and column): converts the input string to lowercase and returns the result ;. INITCAP (string and column): upper-case letters at the beginning ;. LENGTH (string, column): returns the LENGTH of the string ;. REPLACE (string, column): REPLACE ;. SUBSTR (string, column, start point [, end point]): String truncation; Numeric functions such :. ROUND (number and column [Reserved decimal digits]): rounding operation ;. TRUNC (number, column): discard the content at the specified position ;. MOD (number 1, number 2); modulo, take the remainder www.2cto.com date function to get the current date: sysdate Java code select sysdate from dual ;. LAST_DAY (). NEXT_DAT (date, number of weeks ). AD D_MONTHS (date, number ). MONTHS_BETWEEN (date 1, date 2) Conversion Function. TO_CHAR (string | column, Format String): converts a date or number into a string for display. TO_DATE (string, Format String); Convert string to DATE data display. TO_NUMBER (string): converts a string to a number for display. Java code select TO_CHAR (sysdate, 'yyyy-mm-dd'), TO_CHAR (sysdate, 'yyyy') from dual Java code select TO_CHAR (sysdate, 'fmyyyy-mm-dd'), TO_CHAR (sysdate, 'yyyy') from dual remove leading date 0; Java code select TO_CHAR (sysdate, 'hh24'), TO_CHAR (sysdate, 'hh-mi-ss') from dual number formatting Java code select TO_CHAR (1222223, '000000') from dual currency Java code select TO_CHAR (999,999,999, 'l999, 100 ') from dual L (locale :. NVL () function, processing NULL Java code select NVL (money, 0) from demo ;. DECODE () function: multi-value judgment Java code decode (column, judgment value 1, display value 1, judgment value 2, display value 2)

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.