# SQL Data Types

> Rippling SQL supported data types

### Description

Rippling SQL supports a rich set of data types for querying and analyzing your workforce data. This guide explains each supported data type, its usage, and examples.

### Primitive Data Types

#### String Types

| SQL Type | Description | Example Values |
| --- | --- | --- |
| _VARCHAR_ | Variable-length character string | `'John Doe'`, `'Engineering'` |
| _TEXT_ | Text data (treated as string) | `'Employee notes...'` |

#### Numeric Types

| SQL Type | Description | Range/Precision | Example Values |
| --- | --- | --- | --- |
| _INT_ | Integer (whole numbers) | \-2^31 < value < 2^31-1 | `42`, `-100`, `0` |
| _FLOAT_ | Floating-point number | 64-bit inexact, variable-precision | `3.14`, `-0.5` |
| _DECIMAL_ | Precise decimal number | Up to 38 digits precision | `1234.56` |

#### Boolean Type

| SQL Type | Description | Valid Values |
| --- | --- | --- |
| _BOOLEAN_ | True/false value | `TRUE`, `FALSE` (case insensitive) |

#### Date and Time Types

| SQL Type | Description | Format | Example Values |
| --- | --- | --- | --- |
| _DATE_ | Calendar date | YYYY-MM-DD | `'2024-01-15'` |
| _TIMESTAMP_ | Date and time | YYYY-MM-DD HH:MM:SS | `'2024-01-15 14:30:00'` |

* * *

### Complex Data Types

#### Array Type

| SQL Type | Description | Example |
| --- | --- | --- |
| _ARRAY_ | Ordered collection of values | `['Engineering', 'Product']` |

#### JSON Type

| SQL Type | Description | Example |
| --- | --- | --- |
| _JSON_ | Semi-structured JSON data | `{"key": "value"}` |

#### Variant Type

| SQL Type | Description | Use Case |
| --- | --- | --- |
| _VARIANT_ | Flexible type for heterogeneous data | Fields that can contain different data types |

Variant types support the following subtypes:

-   `STRING`
-   `INT`
-   `FLOAT`
-   `DECIMAL`
-   `DATE`
-   `TIMESTAMP`
-   `BOOLEAN`

#### NULL Type

| SQL Type | Description |
| --- | --- |
| _NULL_ | Represents missing or unknown values |

* * *

### Type Casting

You can convert between compatible types using the [CAST function](https://developer.rippling.com/documentation/rippling-platform/transformations/sql-reference/cast).

Source: https://developer.rippling.com/documentation/rippling-platform/transformations/sql-reference/datatypes

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
