Use the Replicate function in SQL to print specific number of Characters

By [)ia6l0 iii

This is extremely useful function when you want to display number of characters depending on some column value.

For e.g.

SELECT score, REPLICATE( '*', score)
FROM [Scores]

would print like this:

4*****
5 *****
10 **********

Use the Replicate function in SQL to print specific number of Characters  (998 Views)