云日志服务 LTS-字符串函数:repeat函数

时间:2024-01-25 20:23:05

repeat函数

将字符串重复指定次数。

语法:repeat(str, num)

表10 参数说明

参数名称

描述

类型

是否必选

str

原始字符串。

String

num

重复次数

Integer

返回值类型:String类型

示例:SELECT REPEAT('hello world', 2), REPEAT('hello world', 0)

表11 查询分析结果

类型

场景1

场景2

查询语句

REPEAT('hello world', 2)

REPEAT('hello world', 0)

返回结果

hello worldhello world

  
support.huaweicloud.com/usermanual-lts/lts_07_0093.html