Pads the right side of a string with characters until it reaches a specified length. Right padding.
STRINGDiperbarui: 13 Jun 2026RPAD(value, length [, pattern])The string to pad
The desired total length
The padding character (default: space)
1 SELECT RPAD('Hello', 10, '-') as result;
Adds trailing dashes.
1 SELECT 2 RPAD(product_name, 30, '.') || LPAD(CAST(price AS STRING), 10, ' ') as line 3 FROM `project.dataset.products`;
Formats output for print reports.
| line |
|---|
| iPhone 15..................... 15000000 |
| MacBook Pro................... 25000000 |
Sudah paham RPAD? Latih langsung di browser
Latihan interaktif, langsung di browser.