Single-line functions (Chapter Summary), Chapter Summary

Source: Internet
Author: User

Single-line functions (Chapter Summary), Chapter Summary
1. single-row functions can complete many independent small functions.


2. The main function of a character function is to process string data, such as converting a string into uppercase, lowercase, and searching.


3. The ROUND () function can be used to ROUND the number of digits. The TRUNC () function can be used to cut down decimal places.


4. SYSDATE can get the current system date. Using the date function to process the date can avoid the leap year problem.


5. Many TO_CHAR () functions are used in conversion functions. The TO_CHAR () function can be used to convert a date or number into a formatted string.


6. In mathematical calculations, if null exists, the result is null. In this case, the NVL () or NVL2 () function can be used to convert null to the specified content.


7. Use the NULLIF () function to determine whether the results of the two expressions are equal.


8. The Decode () function and the CASE expression can be used to determine the output based on multiple conditions.
Common single-row functions in oracle databases include

LOWER ('SQL course') = SQL Course
UPPER ('SQL course') = SQL Course
CONCAT ('good', 'morning') =
SUBSTR ('string', 1, 3) = Str
LENGTH ('string') = 6
INSTR ('string', 'R') = 3
ROUND (45.926, 2) = 45.93
TRUNC (45.926, 2) = 45.92
TO_CHAR
NVL
DECODE
AVG
COUNT
MAX
MIN
SUM
And so on.


Why can't single-row and multi-row functions use database knowledge at the same time?

Single-row functions and group functions can be used together. I don't know what you mean. Paste the example to the end.

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.