Name

REPEAT( )

Synopsis

REPEAT(string, count)

This function returns the string given in the first argument of the function, as many times as specified in the second argument. It returns an empty string if count is less than or equal to 0. It returns NULL if either argument is NULL.

SELECT REPEAT('Urgent! ', 3)
AS 'Warning Message';

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.