Numeric Literals

 
Syntax

 

numeric_literal.bmp

 

  • If a numeric literal contains only digits, an optional sign, and an optional decimal point, it will have a data type of SQL Numeric.  

    • The precision of the literal will be the count of all digits before and after the decimal point.  

    • The scale of the field will be zero if no decimal point is present.  

    • If a decimal point is present, the scale will be the total number of digits following the decimal point.  

  • If the "e" symbol is present in the numeric literal, the number is in scientific notation, and the data type will be Qfloat (see Data Types).  At data retrieval time the value will be downgraded to SQL double.

Examples of Numeric Literals:

 

Literal

Data Type

1234

Numeric(4,0)

-123456

Numeric(6,0)

12345.56

Numeric(5,2)

123e0

Double