Oracle function substr (str1, pos, [len])

Source: Internet
Author: User
Obtain the substring function. Optional. If there is no len, the substring from the returned position to the end of the substring is unknown. Here, a pos can be specified as a negative number, and the position is from the word

Obtain the substring function. Optional. If there is no len, the substring from the returned position to the end of the substring is unknown. Here, a pos can be specified as a negative number, and the position is from the word

Obtain the substring function. The parameter is optional. If there is no len, the substring from the returned position to the end of the substring is unknown.

Here, you can specify pos as a negative number, starting from the position of pos characters before the end of the string.

For example:

Select substr ('abcdefg',-1) from dual;
The returned result is g.

Select substr ('abcdefg',-3, 2) from dual;
Returned result: ef

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.