Asked 2 years ago
31 May 2022
Views 618
Cimb

Cimb posted

what is the use of REPEAT in MySQL?

what is REPEAT in MySQL ? how to use function REPEAT in MySQL?
rajiv

rajiv
answered Jun 2 '22 00:00

The REPEAT() function can repeat a given word or string or character at the given time in MySQL.

The REPEAT() function syntax
REPEAT(string,n)
so the string is repeated nth time in return of the function


select REPEAT("LOVE ",10);//LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE 

so above query, return 10th-time LOVE word .
Post Answer