Text & patterns Scalar Table

repeat()

Repeats the string count number of times

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

Example

1 more ↓
repeat example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

More examples

repeat example 2
SQL
Haybarn WASM 1.5.5-rc3 · 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 ↗