STR() Function in SQL Server Last Updated : 24 Sep, 2020 Comments Improve Suggest changes Like Article Like Report The STR() function converts a numeric value to a character value. Syntax : STR(float_expression [, length [, decimal]]) Parameter : This method accepts three parameters as mentioned above and described below : float_expression : It is a numeric expression that evaluates to an approximate number with a decimal point. length : It is the total length of the returned string. decimal : It is the number of places to the right of the decimal point. Returns : It returns a number as a string. Example-1 : SELECT STR(246.573, 6, 2); Output : 246.57 Example-2 : SELECT STR(246.573, 3, 3); Output : 246 Example-3 : SELECT STR(246.573, 2, 2); Output : ** Example-4 : SELECT STR(246.573, 8, 4); Output : 246.5730 Comment More infoAdvertise with us Next Article STR() Function in SQL Server S sanjoy_62 Follow Improve Article Tags : SQL DBMS-SQL SQL-Server Similar Reads SQRT() Function in SQL Server SQRT() function : This function in SQL Server is used to return the square root of a specified positive number. For example, if the specified number is 81, this function will return 9. Features : This function is used to find the square root of a given number. This function accepts only positive num 2 min read SUM() Function in SQL Server The SUM() function in SQL Server is an essential aggregate function used to calculate the total sum of values in a numeric column. It aggregates data by summing up all values in the specified column for the rows that match the criteria of the query.In this article, We will learn about SUM() Function 3 min read YEAR() Function in SQL Server The YEAR() function in SQL Server is a powerful tool designed to extract the year component from a given date or datetime expression. It allows users to isolate the year as an integer value and facilitating various date-related operations and analyses.In this article, We will learn about the YEAR() 2 min read UPPER() function in SQL Server The UPPER() function in SQL Server is a useful tool for converting all characters in a string to uppercase. This function is essential for ensuring uniform text formatting and for performing case-insensitive comparisons.In this article, We will learn about the UPPER() function in SQL Server by under 3 min read SQL Server TRIM() Function The SQL Server TRIM() function omits the space character or additional stated characters from the beginning or the end of a specified string. TRIM in SQL ServerThe TRIM function in SQL Server is used to remove leading and trailing spaces from a string. Itâs particularly useful for manipulating and c 2 min read Like