Oracle-PL/SQL

Source: Internet
Author: User
I. Functions
1. lpad/rpad in Oracle/PLSQL, the lpad function pads the left-side of a string with a specific set of characters. the syntax for the lpad function is: lpad (string1, padded_length, [pad_string]) string1 is the string to pad characters to (the left-hand side ). padded_length is the number of characters to return. if
Padded_length is smaller than the original string, the lpad Function
Will truncate the string to the size of padded_length.pad_string is optional. This is the string that will be padded
The left-hand side of string1. if this parameter is omitted, the lpad
Function will pad spaces to the left-side of string1. For example: lpad ('tech ', 7); wocould return 'tech'
Lpad ('tech ', 2); wocould return 'te'
Lpad ('tech ', 8, '0'); wocould return 'technical tech'
Lpad ('tech on the net', 15, 'z'); wocould return 'tech on the net'
Lpad ('tech on the net', 16, 'z'); wocould return 'ztech on the net' Oracle/PLSQL: lpad function used in Oracle/PLSQL, the lpad function pads the left-side of a string with a specific set of characters. the syntax for the lpad function is: lpad (string1, padded_length, [pad_string]) string1 is the string to pad characters to (the left-hand side ). padded_length is the number of characters to return. if
Padded_length is smaller than the original string, the lpad Function
Will truncate the string to the size of padded_length.pad_string is optional. This is the string that will be padded
The left-hand side of string1. if this parameter is omitted, the lpad
Function will pad spaces to the left-side of string1. for example:

Lpad ('tech ', 7); wocould return 'tech'
Lpad ('tech ', 2); wocould return 'te'
Lpad ('tech ', 8, '0'); wocould return 'technical tech'
Lpad ('tech on the net', 15, 'z'); wocould return 'tech on the net'
Lpad ('tech on the net', 16, 'z'); wocould return 'ztech on the net'

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.