Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - 数据库管理和参考 » UltraLite SQL 参考 » UltraLite SQL 函数 » SQL 函数 (P-Z)

 

REPLICATE 函数 [String]

以指定的次数连接字符串。

语法
REPLICATE( string-expression, integer-expression )
参数
  • string-expression   要重复的字符串。

  • integer-expression   字符串的重复次数。

返回值

LONG VARCHAR

LONG NVARCHAR

注释

如果结果字符串的实际长度超过返回类型的最大值,会产生错误。结果将截断为所允许的最大字符串大小。

可以尝试使用 REPEAT 函数作为替代。

另请参见
标准和兼容性
  • SQL/2003   服务商扩充。

示例

下面的语句返回值 repeatrepeatrepeat。

SELECT REPLICATE( 'repeat', 3 );