Collections:
Exact Numeric Literals in SQL Server Transact-SQL
What are exact numeric literals supported in SQL Server Transact-SQL?
✍: FYIcenter.com
Exact numeric literals in Transact-SQL are numbers written in
standard signed decimal formats.
Exact numeric literals are used to provide values to exact numeric variables or table columns like INTEGER, DECIMAL(8,2), MONEY, etc.
Exact numeric literals are also used in exact numeric operations in expressions and exact numeric arguments in functions.
Here are some simple rules on how to write string literals:
Here are some example on how to write exact numeric literals:
-- Identical exact numeric literals PRINT 9; PRINT 9.; -- Identical exact numeric literals PRINT 9.0; PRINT +9.0; PRINT 09.0; -- Different exact numeric literals PRINT 9; PRINT 9.0; PRINT 9.00; -- Exact numeric literals in operation PRINT 1.0/3;
⇒ Approximate Numeric Literals in SQL Server Transact-SQL
⇐ Unicode Character String Literals in SQL Server Transact-SQL
2017-05-05, 3735🔥, 0💬
Popular Posts:
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL? If your transaction receives th...
How To Select All Columns of All Rows from a Table with a SELECT statement in SQL Server? The simple...