Collections:
FLOOR, CEILING, ROUND - Converting Values to Integers in SQL Server
How To Convert Numeric Values to Integers in SQL Server Transact-SQL?
✍: FYIcenter.com
Sometimes you need to round a numeric value into an integer. SQL Server 2005 offers you a number of ways to do this:
The tutorial exercise below gives some good examples of converting numeric values to integers:
SELECT FLOOR(1234.5678); SELECT CEILING(1234.5678); SELECT ROUND(1234.5678, 0, 0); SELECT CAST(1234.5678 AS INT); SELECT CONVERT(INT, 1234.5678); GO 1234 1235 1235.0000 1234 1234
⇒ ROUND() - Rounding Values to Specific Precisions in SQL Server
⇐ Mathematical Functions Supported by SQL Server 2005 in SQL Server
⇑ Numeric Expressions and Functions in SQL Server Transact-SQL
2017-03-22, 4953🔥, 0💬
Popular Posts:
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...
How to set the current database in SQL Server? Once you are connected to the SQL Server, you should ...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...
How To Format Time Zone in +/-hh:mm Format in SQL Server Transact-SQL? From the previous tutorial, y...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...