HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Return a number as a string
The STR() function returns a number as a string.
STR(number, length, decimals)
Parameter | Description |
---|---|
number | Required. The number to convert to a string |
length | Optional. The length of the returning string. Default value is 10 |
decimals | Optional. The number of decimals to display in the returning string. Default value is 0 |
Works in: | SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
Return a number as a string:
SELECT STR(185.5);
Return a number as a string:
SELECT STR(185.476, 6, 2);