October 6th, 2008

Exact Numeric Data, Part 1 of 2

Posted by admin in F. Data Types

Exact numeric data is represented by the following:> It can be negative, zero, or positive.

> It can be an integer. This means that it is a whole number written without a decimal point.
Examples are: -24, 0, and 83695.

> It can be a decimal number. This means that it has digits to the right of the decimal point.
Examples are: -32.4, 0.0, 765.0 or 0.0000627.

> If the numbers are not used in calculations, then they can be defined as alphanumeric literals. Leading zeroes are retained with alphanumeric literals. Examples are: telephone numbers, social security numbers, and zip codes.

> Don’t enclose a numeric literal in quotes. Leading zeroes are removed with numeric literals. Calculations are fastest with integers, and are slower with decimal numbers and floating point numbers.

> Most DBMS systems implement SMALLINT, INTEGER, BIGINT and DECIMAL.

> SQL:2003 introduced BIGINT.

> Oracle converts INT to NUMBER(32).

Comments are closed.

Sorry, the comment form is closed at this time.