Data types in sql

In SQL we have more than 40 different data types. But these seven are the most
important ones:

  1. Integer. A whole number without a fractional part. E.g. 1, 156, 2012412
  2. Decimal. A number with a fractional part. E.g. 3.14, 3.141592654, 961.1241250
  3. Boolean. A binary value. It can be either TRUE or FALSE.
  4. Date. Speaks for itself. You can also choose the format. E.g. 2017-12-31
  5. Time. You can decide the format of this, as well. E.g. 23:59:59
  6. Timestamp. The date and the time together. E.g. 2017-12-31 23:59:59
  7. Text. This is the most general data type. But it can be alphabetical letters only,
    or a mix of letters and numbers and any other characters. E.g. hello, R2D2,
    Tomi, 124.56.128.4