Try this

SELECT CONVERT(DECIMAL(10,2),YOURCOLUMN)

such as

SELECT CONVERT(DECIMAL(10,2),2.999999)

will result in output 3.00

Answer from Manoj on Stack Overflow
🌐
Database Guide
database.guide › 4-functions-to-format-a-number-to-2-decimal-places-in-sql-server
4 Functions to Format a Number to 2 Decimal Places in SQL Server
February 9, 2022 - Another way to format a number to two decimal places is to use the STR() function: ... This function returns character data converted from numeric data. The character data is right-justified, with a specified length and decimal precision. The first argument is an expression of float data type ...
Discussions

t sql - T-SQL Format integer to 2-digit string - Stack Overflow
I can't find a simple way to do this in T-SQL. I have for example a column (SortExport_CSV) that returns an integer '2' thru 90. If the stored number is a single digit, I need it to convert to a 2 digit string that begins with a 0. I have tried to use CAST but I get stuck on how to display the style in the preferred format ... More on stackoverflow.com
🌐 stackoverflow.com
mysql - Display two digits after decimal point in SQL from average value - Database Administrators Stack Exchange
You might find helpful the question .../11190668/format-number-to-2-decimal-places · Note that the linked post has an answer by jmarceli that handles rounding or not rounding, according to your need. ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... 1 Why would Mysql's Round(N.DD,1) sometimes show no digits after the ... More on dba.stackexchange.com
🌐 dba.stackexchange.com
March 30, 2016
How to display two digits after decimal point in SQL Server - Stack Overflow
I have table which has a column of float data type in SQL Server I want to return my float datatype column value with 2 decimal places. ... This question is similar to: how to get 2 digits after decimal point in tsql?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. ... decimal(10,2) means you can have a decimal number ... More on stackoverflow.com
🌐 stackoverflow.com
Convert day to 2 digits
I want to get the day as 2 digits. For example if I do this: Select day(getdate()) It returns 1 Whereas I want it to return 01 Any idea on how can this be done. Thanks in advance! More on tek-tips.com
🌐 tek-tips.com
16
0
December 1, 2008
🌐
MSSQLTips
mssqltips.com › home › sql format number with cast, convert and more
SQL Format Number with CAST, CONVERT and more
October 31, 2025 - Daniel also regularly speaks at SQL Servers conferences and blogs. MSSQLTips Awards: Author of the Year Contender – 2015-2018, 2022, 2023 | Champion (100+ tips) – 2018 ... SELECT FORMAT(5634.6334, ‘N’, ‘en-us’) AS ‘Number’ returns 5,634.63 (and not 5,634.6334) because the formatting string precision defaults to a scale of two.
🌐
W3Schools
w3schools.com › sql › func_mysql_format.asp
MySQL FORMAT() Function
SQL Examples SQL Editor SQL Quiz SQL Exercises SQL Server SQL Syllabus SQL Study Plan SQL Bootcamp SQL Certificate SQL Training ... The FORMAT() function formats a number to a format like "#,###,###.##", rounded to a specified number of decimal ...
🌐
Database Guide
database.guide › 7-functions-to-format-a-number-to-2-decimal-places-in-mysql
7 Functions to Format a Number to 2 Decimal Places in MySQL
April 26, 2023 - The FORMAT() function also accepts a third argument that allows us to specify a locale to use for the result: ... Here, I specified 'de_DE' as the locale. This time the group separator is a period/full stop, and the decimal separator is a comma. We can use the LEFT() function to return a given ...
Find elsewhere
🌐
SQL Server Guides
sqlserverguides.com › format-number-to-2-decimal-places-in-sql-server
Format Number to 2 Decimal Places in SQL Server - SQL Server Guides
November 9, 2023 - Here CAST(price AS decimal(10,2)), converts each value of the price column to decimal with a precision of 10 (Where 10 represents the maximum number of digits in the number) and a scale of 2 (Where 2 represents the number of decimal places). So that each price is formatted with two decimal places. This is you can format number to 2 decimal places in SQL Server.
🌐
Database Guide
database.guide › how-to-format-numbers-in-sql-server
How to Format Numbers in SQL Server
May 3, 2018 - The digit placeholder allows me to specify a format for the number, using the # symbol as a placeholder for each number. ... Another custom numeric format specifier is zero (0). You can use this to pad a number with leading zeros: SELECT FORMAT(7, '000') AS 'Example 1', FORMAT(123, '0000') AS ...
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-format-number-to-2-decimal-places-in-mysql
How to format number to 2 decimal places in MySQL?
March 19, 2023 - SELECT TRUNCATE(yourColumnName,2) as anyVariableName from yourTableName; To understand the above syntax, let us first create a table. The query to create a table is as follows ? mysql> create table FormatNumberTwoDecimalPlace -> ( -> Number float -> ); Query OK, 0 rows affected (0.59 sec)
🌐
Sqlzap
sqlzap.com › blog › sql-select-with-2-decimal-places
SQL SELECT with 2 Decimal Places
September 29, 2024 - For example · SELECT product_name, FORMAT(price, 2) AS formatted_price FROM products; Now, even if a product costs exactly $10, it'll show up as $10.00 in your results. Sometimes, you might need to change the data type of your column to get the desired decimal places.
🌐
Baeldung
baeldung.com › home › sql functions › how to round numbers to two decimal places in sql
How to Round Numbers to Two Decimal Places in SQL Baeldung on SQL
June 21, 2024 - However, in MSSQL, we use N2 instead of 2 to represent two decimal places: SELECT FORMAT(scores, 'N2') FROM exam AS formatted_scores; formatted_scores 84.46 92.68 75.21 ... Hence, it yields a similar result for the scores column in the Exam table.
🌐
Tek-Tips
tek-tips.com › home › forums › software › programmers › dbms packages › microsoft sql server: programming
Convert day to 2 digits | Tek-Tips
December 1, 2008 - If you want the value to be 2 digits (padded on the left with zero's), you need to use a string type (like varchar). So... 1. convert to varchar 2. put 0's on the left 3. take the 2 rightmost characters. Ex: 1 '00' + '1' Right('001', 2) = '01' Make sense? -George "The great things about standards ...
🌐
Medium
priya-yogendra.medium.com › formatting-or-fixing-decimal-places-4a91da8f79b6
Formatting or fixing Decimal places | by Priya Yogendra Rana | Medium
July 16, 2023 - In SQL, we can use ROUND(), CAST(), FORMAT(), CONVERT() and STR() functions to set the decimal points. Example: ROUND(342.5738, 2) //output will be 342.57 ... The third part of the function is optional.
🌐
Sqlmatters
sqlmatters.com › Articles › Formatting a number with thousand separators.aspx
Formatting a number with thousand separators - SQLMatters
You might prefer to encapsulate this into a User Defined Function (UDF), though if performance is an issue a CLR should perform better. I will finish by pointing out that formatting numbers is something that should really be left to the presentation layer (e.g. Reporting Services or Excel) rather than SQL, which is probably why Microsoft hasn’t included the functionality to do this.
🌐
Access World
access-programmers.co.uk › home › forums › microsoft access discussion › queries
SQL Round to 2 Decimal Points?? | Access World Forums
January 6, 2006 - Hi Daniela - The formatting is something separate from the SQL statement. In the design view of the query, right click on the [CountofStudent Attended] field and select Properties. Set the Format item to Fixed and then the Decimal Places item to 2.