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
🌐
MSSQLTips
mssqltips.com › home › sql format number with cast, convert and more
SQL Format Number with CAST, CONVERT and more
October 31, 2025 - SELECT CONVERT(int, 'maybe int') as int_ GO SELECT TRY_CONVERT(int, 'maybe int') as try_convert_int GO · The SQL ROUND function may be useful if you want to round the number of decimal places...
Discussions

sql server - Format value to configured number of decimal places - Database Administrators Stack Exchange
I want to format a number to display decimal places according to a configuration value specified in another table. If the configured value is NULL, the number of decimal places should default to 2 ( More on dba.stackexchange.com
🌐 dba.stackexchange.com
February 15, 2017
Formatting numbers (commas and decimal) – SQLServerCentral Forums
I want to create a SQL statement ... fields, and return the number of decimal places that I specify. ... I am using MS-SQL, and I would like to have it run in the Query Analyzer. This is the only place where I will have the ability to format this number.... More on sqlservercentral.com
🌐 sqlservercentral.com
September 22, 2007
Newbie question. Sum of Float numbers in Bigquery results in many decimals
Use Round function to reduce your results to 2 decimal places. Something like: Round(Sum(_booking_gross_value),2) More on reddit.com
🌐 r/bigquery
11
2
March 13, 2020
Round value to 2 decimal places
…ROUND(MAX(temperature), 2) AS maxtemp …$row[‘maxtemp’] You can apply the ROUND function to the output of MAX. And, you can give the columns in your result sets names (here, “maxtemp”) so you don’t have to repeat the formula when creating your HTML. More on reddit.com
🌐 r/mysql
7
2
June 3, 2024
🌐
W3Schools
w3schools.com › mysql › func_mysql_format.asp
MySQL FORMAT() Function
The FORMAT() function formats a number to a format like "#,###,###.##", rounded to a specified number of decimal places, then it returns the result as a string. ... If you want to use W3Schools services as an educational institution, team or ...
🌐
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.
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › functions › format-transact-sql
FORMAT (Transact-SQL) - SQL Server | Microsoft Learn
This example uses the N format specifier. The N specifier is used for numeric values, and the number of decimal places can be adjusted by changing the format string (for example, N2 for two decimal places).
🌐
Sqlzap
sqlzap.com › blog › sql-select-with-2-decimal-places
SQL SELECT with 2 Decimal Places
September 29, 2024 - SELECT CAST(column_name AS DECIMAL(10,2)) AS formatted_value FROM your_table; This method tells SQL to treat the number as a decimal with 10 total digits, 2 of which are after the decimal point. It's like giving your numbers a makeover! Sometimes, you might need to find values with more than ...
Find elsewhere
🌐
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 - The second argument is the total length. This includes decimal point, sign, digits, and spaces. The default is 10. The third argument is the number of places to the right of the decimal point.
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › data-types › decimal-and-numeric-transact-sql
decimal and numeric (Transact-SQL) - SQL Server | Microsoft Learn
November 18, 2025 - For example, the constant 12.345 is converted into a numeric value, with a precision of 5, and a scale of 3. By default, SQL Server uses rounding when converting a number to a decimal or numeric value with a lower precision and scale.
🌐
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.
🌐
Database Guide
database.guide › how-to-format-numbers-in-sql-server
How to Format Numbers in SQL Server
May 3, 2018 - SELECT FORMAT(1, 'P') AS 'Example 1', FORMAT(.375, 'P') AS 'Example 2', FORMAT(.0375, 'P', 'tr-tr') AS 'Example 3'; ... Note that “Example 3” includes a third argument, which specifies the culture to be used in the output. In this case, I use tr-tr for Turkish. This results in the percent sign being prepended to the number (instead of appended, like the others). It also results in a comma being used as the decimal separator.
🌐
W3Schools
w3schools.com › sql › func_sqlserver_round.asp
SQL Server ROUND() Function
String Functions: Asc Chr Concat ... Plan SQL Bootcamp SQL Certificate SQL Training ... The ROUND() function rounds a number to a specified number of decimal places....
🌐
DataCamp
datacamp.com › doc › mysql › mysql-format
MySQL FORMAT Expressions: Usage & Examples
The `FORMAT` expression in MySQL is used to format numbers to a specified number of decimal places, adding commas as thousands separators. It is particularly useful for enhancing the readability of numerical data in SQL queries.
🌐
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 - You can use TRUNCATE() function from MySQL to format number to 2 decimal places. The syntax is as follows − To understand the above syntax, let us first create a table. The query to create a table is as follows − Insert some records in the table
🌐
MariaDB
mariadb.com › docs › server › reference › sql-functions › string-functions › format
FORMAT | Server | MariaDB Documentation
Format a number. This function formats a number to a format like '#,###,###.##', rounded to a specified number of decimal places.
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › formatting-numbers-commas-and-decimal
Formatting numbers (commas and decimal) – SQLServerCentral Forums
September 22, 2007 - -- Frank Kalis Microsoft SQL Server MVP Webmaster: http://www.insidesql.org/blogs My blog: http://www.insidesql.org/blogs/frankkalis/[/url] ... SSC Eights! ... After confirming what Frank says about 'resentation issue...' I just add that sometimes a 'vb format in tsql' can be usefule... ... Peter E. Kierstead ... I use this quick and dirty function (emphasis on adjectives) for integer and decimal values. You must convert the number to a string format before calling this function (although it will automatically cast with the call).
🌐
LearnSQL.com
learnsql.com › cookbook › how-to-convert-an-integer-to-a-decimal-in-sql-server
How to Convert an Integer to a Decimal in SQL Server | LearnSQL.com
Here’s another way to convert an integer to a DECIMAL type: SELECT CONVERT(DECIMAL(7,2), 12) AS decimal_value; This query produces the same result as CAST(), but takes two mandatory arguments: the data type and an expression, value, or column ...
🌐
Databricks
docs.databricks.com › reference › sql language reference › functions › built-in functions › alphabetical list of built-in functions › format_number function
format_number function | Databricks on AWS
June 30, 2025 - Formats expr like #,###,###.##, rounded to scale decimal places. Formats expr like fmt. ... A negative scale produces a null. ... > SELECT format_number(12332.123456, 4); 12,332.1235 > SELECT format_number(12332.123456, '#.###'); 12332.123 > SELECT format_number(12332.123456, 'EUR ,###.-'); EUR 12,332.-
🌐
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 - In the query part FORMAT(price, ‘N2’), where N means to format the number as a number and 2 means make sure that the number is displayed with two decimal places. The STR() function in SQL Server takes the numeric value and converts it into ...
🌐
W3Schools
w3schools.com › sql › func_mysql_round.asp
MySQL ROUND() Function
String Functions: Asc Chr Concat ... Plan SQL Bootcamp SQL Certificate SQL Training ... The ROUND() function rounds a number to a specified number of decimal places....