Preamble
The Oracle/PLSQL RPAD function supplements a certain character set from the right side of the string (at non-zero string1).
Syntax of the Oracle/PLSQL RPAD function
RPAD( string1_id, padded_length_id, [ pad_string_id ] )
Parameters and function arguments
- string1_id – string for adding characters (on the right side).
- padded_length_id – number of returned characters. If padded_length is smaller than the source string, the RPAD function will crop the line with padded_length.
- pad_string_id – it is not obligatory. It is a string that will be matched on the right side of string1. If this parameter is not specified, RPAD function will add spaces to right side of string1.
The RPAD function returns a string value.
RPAD function can be used in the following Oracle/PLSQL versions
|
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
|
Let’s consider some examples of RPAD function and learn how to use RPAD function in Oracle PLSQL.
SQL> SELECT RPAD('abcd', 7) FROM DUAL;
--Result: abcd
SQL> SELECT RPAD('abcd', 2) FROM DUAL;
--Result: ab
SQL> SELECT RPAD('abcd', 8, '0') FROM DUAL;
--Result: abcd0000.
SQL> SELECT RPAD('abcd ef ghi jkl', 15, 'z') FROM DUAL;
--Result: abcd ef ghi jkl
SQL> SELECT RPAD('abcd ef ghi jkl', 16, 'z') FROM DUAL;
--Result: abcd ef ghi jklz
How to Add Character using RPAD function in Oracle SQL Database
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
Real Estate IT Economics with Financial Precision: Enteros’ Cost Attribution Intelligence
- 9 February 2026
- Database Performance Management
Introduction Real estate has always been an asset‑heavy, capital‑intensive industry. From commercial portfolios and residential developments to REITs and PropTech platforms, profitability depends on precise financial control. Yet while real estate organizations apply rigorous financial discipline to assets, leases, and investments, their IT and data environments often lack the same level of cost transparency. Modern … Continue reading “Real Estate IT Economics with Financial Precision: Enteros’ Cost Attribution Intelligence”
Managing Database Growth with Financial Precision: Enteros for Tech Leaders
Introduction For technology enterprises, databases are no longer just systems of record—they are engines of innovation. SaaS platforms, AI applications, digital marketplaces, analytics products, and customer-facing services all depend on rapidly growing databases that must scale continuously, remain highly performant, and stay available around the clock. But as database environments grow, so do costs. Cloud … Continue reading “Managing Database Growth with Financial Precision: Enteros for Tech Leaders”
From Performance to Profitability: Enteros Database Intelligence for Real Estate Enterprises
- 8 February 2026
- Database Performance Management
Introduction The real estate sector has undergone a dramatic transformation over the past decade. What was once an asset-heavy, relationship-driven industry is now deeply digital, data-intensive, and platform-centric. Property listing portals, smart building platforms, tenant experience apps, valuation engines, AI-driven pricing models, IoT-enabled facilities management systems, and digital transaction platforms all rely on complex, always-on … Continue reading “From Performance to Profitability: Enteros Database Intelligence for Real Estate Enterprises”
Running Retail on Data: How Enteros Transforms Database Performance Management
Introduction Retail has evolved far beyond physical stores and point-of-sale systems. Today’s retail enterprises operate complex, always-on digital ecosystems that span e-commerce platforms, mobile apps, omnichannel order management, supply chain systems, loyalty programs, personalization engines, and real-time analytics. Every product search, cart update, inventory check, price change, promotion, and payment depends on high-performing databases working … Continue reading “Running Retail on Data: How Enteros Transforms Database Performance Management”