OracleDB nested Functions

Source: Internet
Author: User
A single-row function can be nested to any depth. The calculation sequence of nested functions is from the innermost layer to the outermost layer. The following examples show the flexibility of such functions.

A single-row function can be nested to any depth. The calculation sequence of nested functions is from the innermost layer to the outermost layer. The following examples show the flexibility of such functions.

The example shows the last name of an employee in department 60. The calculation of this SQL statement involves the following three steps:

1. The internal function retrieves the first eight characters of the last name.

Result1 = SUBSTR (LAST_NAME, 1, 8)

2. The outer function Concatenates the result with _ US.

Result2 = CONCAT (Result1, '_ us ')

3. the outermost function converts the result to uppercase.

Because the column alias is not given, the entire expression becomes the column title.

Example:

Displays the date of the next Friday six months after the employment date. Sort the results by employment date.

Next 6 Month Review

Bytes -------------------------------------------------------------------------------------

Friday, July 20 th, 2001

Friday, December 13th, 2002

Friday, December 13th, 2002

,

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.