Floating-point constants

Floating-point constants are accepted in two general forms:
  • digits.[digits][e[+-]digits]
  • [digits].digits[e[+-]digits]

The digits value is one or more decimal digits. At least one digit must be before or after the decimal point. At least one digit must follow the exponent delimiter (e) if that field is present. A floating-point constant is distinguished from an integer constant by the presence of either the decimal point or the exponent clause (or both). You cannot embed a space or other characters in the constant.

The following examples show some valid floating-point constants:
  • 2.5
  • 6.
  • .001
  • 5e2
  • 1.925e-3

Floating-point constants are of double precision type. You can explicitly specify real type by using SQL string notation: real’1.23’ (string style).