Home
SQL Server / T-SQL
Aggregate Functions
Analytical Functions
Constraints
Cursor
Data Set
Data Type
Database
Date Timezone
Index
Insert Delete Update
Math Functions
Select Query
Sequence
Store Procedure Function
String Functions
Subquery
System
Table
Table Joins
Transact SQL
Transaction
Trigger
View
XML
STR « String Functions « SQL Server / T-SQL
SQL Server / T-SQL
String Functions
STR
1.
STR: takes a numeric value and changes the data type to a char
2.
STR(100.325,7)
3.
STR() function right-fills the decimal value with zeros
4.
Specifying an overall length greater than the length of the value, decimal point, and the decimal value, the result will be left-padded with spaces
5.
STR() Function: converts a numeric value to a string
6.
STR(123.456789, 8, 4)