RPAD() 函数右填充一个带有另一个字符串的字符串到一定长度。
笔记:另请参阅LPAD()功能。
RPAD(
string,
length,
rpad_string)
Parameter | Description |
---|---|
string | Required. The original string. If the length of the original string is larger than the length parameter, this function removes the overfloating characters from string |
length | Required. The length of the string after it has been right-padded |
rpad_string | Required. The string to right-pad to string |
工作于: | 从 MySQL 4.0 开始 |
---|
右键在#{0}#中带有#{1}#中的文本,总长度为30:
SELECT RPAD(CustomerName, 30, "ABC") AS RightPadCustomerName
FROM Customers;
亲自试一试 »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!