In SQL Server 2012 and higher, this will format a number with commas:
select format([Number], 'N0')
You can also change 0
to the number of decimal places you want.
More Related Contents:
- How can I remove duplicate rows?
- SQL Server: Examples of PIVOTing String data
- Check if table exists in SQL Server
- Using T-SQL, return nth delimited element from a string
- What is the use of GO in SQL Server Management Studio & Transact SQL?
- SELECT DISTINCT on one column
- Using a if condition in an insert SQL Server
- Altering a column: null to not null
- Maximum size of a varchar(max) variable
- Confused about UPDLOCK, HOLDLOCK
- Concatenating Column Values into a Comma-Separated List
- Is there a way to simplify a NULL compare of 2 values
- TSQL Try / Catch within Transaction or vice versa?
- What is the maximum number of characters that nvarchar(MAX) will hold?
- How do I find a stored procedure containing ?
- TSQL: Create a view that accesses multiple databases
- Sequence as default value for a column
- Aggregate bitwise-OR in a subquery
- How do I flush the PRINT buffer in TSQL?
- OR Operator Short-circuit in SQL Server
- SQL Server 2008 – How do i return a User-Defined Table Type from a Table-Valued Function?
- Check if a string contains a substring in SQL Server 2005, using a stored procedure
- How to change default language for SQL Server?
- T-SQL incrementing counter based on change in a column value
- T-SQL XOR Operator
- Cannot bulk load. Operating system error code 5 (Access is denied.)
- Does query plan optimizer works well with joined/filtered table-valued functions?
- Random record from a database table (T-SQL)
- Random Weighted Choice in T-SQL
- time format in SQL Server