In SQL Server, the T-SQL STR()
function returns character data converted from numeric data. The return value has a return type of varchar.
You provide the numeric data as an argument when calling the function. The function then converts it to character data. There are also two optional arguments that you can use to specify the length, and the number of places to the right of the decimal point.