Exact Numeric Literals in SQL Server Transact-SQL
What are exact numeric literals supported in SQL Server Transact-SQL?
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;
2017-05-05, 1290👍, 0💬
How to run Queries with "sqlcmd" tool in SQL Server? "sqlcmd" is a client tool that you can use to i...
How To Start Instance with a Minimal Initialization Parameter File in Oracle? The sample initializat...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...
How To Use SQL*Plus Built-in Timers in Oracle? If you don't have a stopwatch/timer and want to measu...
How To Create a Simple Stored Procedure in SQL Server Transact-SQL? If you want to create a simple s...