Text & patterns Scalar Table

repeat()

Repeats the string count number of times

Reference: DuckDB 1.3.2

Arguments & returns

4 overloads

repeat(string, count)

Scalar
Overload link stringcount Returns
#01 ANY[]BIGINT ANY[]
#02 BLOBBIGINT BLOB
#03 VARCHARBIGINT VARCHAR

repeat(col0, col1)

Table
Overload link col0col1 Returns
#04 ANYBIGINT TABLE
repeat example
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Engine example · Run to view results.

More examples

repeat example 2
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Engine example · Run to view results.

In other engines

Snowflakespace()

SELECT SPACE(5)
In DuckDB
SELECT REPEAT(' ', CAST(5 AS BIGINT))

SQLGlot example ↗