Basic Oracle Concepts and Programming Question:
How To Write Numeric Literals in Oracle?
Answer:
Numeric literals can coded as shown in the following samples:
SELECT 255 FROM DUAL -- An integer
255
SELECT -6.34 FROM DUAL -- A regular number
-6.34
SELECT 2.14F FROM DUAL -- A single-precision floating point
2.14
SELECT -0.5D FROM DUAL -- A double-precision floating point
-0.5
SELECT 255 FROM DUAL -- An integer
255
SELECT -6.34 FROM DUAL -- A regular number
-6.34
SELECT 2.14F FROM DUAL -- A single-precision floating point
2.14
SELECT -0.5D FROM DUAL -- A double-precision floating point
-0.5
Previous Question | Next Question |
How To Write Text Literals in Oracle? | How To Write Date and Time Literals in Oracle? |