Numeric Data Types


Numeric is a data type is used to store numbers.

  • allows for calculations
  • has a variety of different attributes that can be applied depending on the type of number that is being stored

Types

  • INT
    • integer
    • stores only whole numbers
    • stores 4 bytes of data
  • SMALLINT
    • small integer
    • stores 2 bytes of data
  • DECIMAL
    • allows storing decimals
    • must specify the decimal places
  • FLOAT
    • used to store values that might vary
      • e.g., temperature, heights, weights