MSSQLString FunctionsREPLICATE
PATINDEX

REPLICATEString Functions

REVERSE

Repeats a string n times.

Syntax

REPLICATE(str, n)

Example

Enter values below to update the example in real time.

product_name
rating
stars
reviews
SELECT product_name, REPLICATE('★', rating) AS stars
FROM reviews;