REPEAT (Lakehouse v1)
Renvoie une chaîne composée de la chaîne str répétée count fois. Si count est inférieur à 1, renvoie une chaîne vide. Renvoie NULL si str ou count est NULL.
Syntaxe Analyze
Section intitulée « Syntaxe Analyze »func.repeat(<str>, <count>)Exemples Analyze
Section intitulée « Exemples Analyze »func.repeat(<str>, <count>)┌─────────────────────────┐│ func.repeat('plaid', 3) │├─────────────────────────┤│ plaidplaidplaid │└─────────────────────────┘Syntaxe SQL
Section intitulée « Syntaxe SQL »REPEAT(<str>, <count>)Arguments
Section intitulée « Arguments »| Arguments | Description |
|---|---|
<str> |
La chaîne. |
<count> |
Le nombre. |
Exemples SQL
Section intitulée « Exemples SQL »SELECT REPEAT('databend', 3);┌──────────────────────────┐│ REPEAT('databend', 3) │├──────────────────────────┤│ databenddatabenddatabend │└──────────────────────────┘
SELECT REPEAT('databend', 0);┌───────────────────────┐│ REPEAT('databend', 0) │├───────────────────────┤│ │└───────────────────────┘
SELECT REPEAT('databend', NULL);┌──────────────────────────┐│ REPEAT('databend', NULL) │├──────────────────────────┤│ NULL │└──────────────────────────┘