Teradata RPAD - Right Padding

visibility 587 access_time 2 years ago languageEnglish

Teradata RPAD function is used to add repeated characters at the end of a string to increase the string to a specified length. It can be used to add trailing space or zeros to a string.

RPAD function signature 

RPAD(source_string, length, fill_string)

Returns the source_string padded to the right with the characters in fill_string so that the resulting string is length characters. 

Pad with trailing zeros

SELECT RPAD('123456789',23,'0');



Omit fill_string parameter

The last parameter is optional. When it is omitted, the default value is space (' ')


SELECT RPAD('123456789',23);


'123456789              '
info Last modified by Administrator 2 years ago copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

timeline Stats
Page index 0.95
More from Kontext
Teradata No More Room in Database Error and Table Skewness
visibility 2,406
thumb_up 0
access_time 2 years ago
Create Table with Parquet, Orc, Avro - Hive SQL
visibility 2,857
thumb_up 1
access_time 2 years ago