Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

REPEAT Function


The REPEAT function returns the character string with a length equal to the number of repeated input character strings. The return value is a VARCHAR type. The maximum length of the characcter string is 33,554,432 and if it this length is exceeded, NULL will be returned. If one of the parameters is NULL, NULL will be returned.


REPEAT( string, count )

  • string : Character string
  • count : Repeat count. If you enter 0 or a negative number, an empty string will be returned and if you enter a non-numeric data type, an error will be returned.

SELECT REPEAT('cubrid',3);

   repeat('cubrid', 3)




SELECT REPEAT('cubrid',32000000);

   repeat('cubrid', 32000000)




SELECT REPEAT('cubrid',-1);

   repeat('cubrid', -1)




SELECT REPEAT('cubrid','a');

ERROR: Cannot coerce value of domain "character" to domain "integer".