A numeric literal is a string of digits that SQL interprets as a decimal number. SQL allows the string to be in a variety of formats, including scientific notation.

Syntax

This is the syntax for numeric literals:

[ + | -  ] { [  0-9  ] [ 0-9 ] ... }
  [  . [  0-9  ] [  0-9  ] ... ] 
  [ { E  |  e  }  [  +  |  -  ] [  0-9  ] { [  0-9  ] } ]
                

Example

The numeric strings in the following example are all valid:

123
123.456
-123.456
12.34E-04