REPEAT()

Documentation

VoltDB Home » Documentation » Using VoltDB

REPEAT()

REPEAT() — Returns a string composed of a substring repeated the specified number of times.

Synopsis

REPEAT( string-expression, numeric-expression )

Description

The REPEAT() function returns a string composed of the substring string-expression repeated n times where n is defined by the second argument to the function.

Example

The following example uses the REPEAT and the CHAR_LENGTH functions to replace a column's actual contents with a mask composed of the letter "X" the same length as the original column value.

SELECT username, REPEAT('X', CHAR_LENGTH(password)) as Password 
    FROM accounts ORDER BY username;