MSSQL: has no REPEAT; uses REPLICATE(expr, n), which is exactly
equivalent.
Oracle: has no REPEAT. Workaround: RPAD(expr, LENGTH(expr) * n, expr) — RPAD's first argument already contributes one copy of
expr, and padding with expr itself out to length(expr) * n
characters fills in the remaining n - 1 copies, producing expr
repeated exactly n times (requires expr to be non-empty, since
Oracle treats '' as NULL).
SQLite: throws. SQLite has no REPEAT function and no safe
single-expression workaround (the zeroblob/hex tricks that exist are
fragile and only work for single-character pad values).
Repeat a string N times.
REPEAT(expr, n)(ClickHouse:repeat(expr, n)).REPEAT; usesREPLICATE(expr, n), which is exactly equivalent.REPEAT. Workaround:RPAD(expr, LENGTH(expr) * n, expr)—RPAD's first argument already contributes one copy ofexpr, and padding withexpritself out tolength(expr) * ncharacters fills in the remainingn - 1copies, producingexprrepeated exactlyntimes (requiresexprto be non-empty, since Oracle treats''asNULL).REPEATfunction and no safe single-expression workaround (the zeroblob/hex tricks that exist are fragile and only work for single-character pad values).