Page tree
Skip to end of metadata
Go to start of metadata

The supported column data types in Jethro are:

  • INTEGER - 32-bit integers
  • BIGINT - 64-bit integers
  • FLOAT - 32-bit floating point
  • DOUBLE - 64-bit floating point
  • STRING - Stores string values of up to 4KB. Replaces char() and varchar() data types in other databases. 

  • TIMESTAMP - Includes both a date part (year+month+day) and a time part (hour+minute+second +optional sub-second, up to 6 digits). Valid values are between '1970-01-01 00:00:00' and '2038-01-19 03:14:07'


Info

  1. String processing assumes that the data is in ASCII format. Although Unicode data is allowed to be stored inside string columns (UTF-8), no special Unicode handling is currently implemented.
  2. To specify a string literal in SQL, use double single quotes. For example: 'abc'.
  3. For timestamp literals (constant) in SQL, there is an implicit casting from three string formats to timestamp:
    'yyyy-MM-dd'
    'yyyy-MM-dd HH:mm:ss'
    'yyyy-MM-dd HH:mm:ss.SSS...' (1 to 6 digits)
    For example'2014-02-25 13:14:15.250'
  4. To convert between data types, you can use the explicit casting operator :: or the cast() function

Tip

Always store data using the most appropriate data type for the columns' range of possible values.

For example:

  • Don't store numbers as strings.
  • Don't store timestamps as strings or numbers (unless the range of values doesn't fit between the years 1970-2038).

See Also

Conversion Functions

  • No labels