While creating a table, you need to specify a data type for each column to define what kind of data you want to store. This section will look into the various data types supported in Oxla. Now, let’s get an overview of each data type:

Data TypeDefinitionFormat
BOOLBoolean value.True or False.
TEXTUTF8 encoded string with Unicode support.‘text’
DATEDate value.YYYY-MM-DD
TIMESTAMP WITHOUT TIME ZONETime and date values without a time zone.YYYY-MM-DD [HH:MM:SS[.SSSSSS]]
TIMESTAMP WITH TIME ZONEDate and time values, including the time zone information.YYYY-MM-DD HH:MM:SS.SSSSSS+TZ
TIMETime values without any date information.HH:MM:SS[.SSSSSS]
JSONA value in JSON standard format.variable_name JSON
INTERVALEncodes a span of timeyear-month (YYYY-MM); day-time (DD HH:MM:SS)
INT32-bit signed integerone or more digits “0” to “9”
BIGINT64-bit signed integerlarge numeric/decimal value
REAL32-bit floating point numberfloat(n)
DOUBLE PRECISION64-bit floating point numberdecimal(p, s)

Overflow Risks
When performing operations on numeric or temporal types, please be aware that overflows can lead to undefined behavior, resulting in unexpected values or errors. Ensure input values are within the allowed range for each numeric type to prevent overflows. This can occur during arithmetic operations or function execution (e.g. AVG()), where the result does not fit the result type. Using larger data types such as BIGINT can help mitigate overflow risks.

Casting Considerations
Explicit casting between types can cause data loss due to altered precision or magnitude, such as truncating fractional seconds in TIME or silently clipping out-of-range values. Please verify input ranges to prevent unintended data loss.