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.