> For the complete documentation index, see [llms.txt](https://docs.servoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.servoy.com/reference/servoycore/dev-api/database-manager/query_column_types.md).

# QUERY\_COLUMN\_TYPES

## Overview

The `QUERY_COLUMN_TYPES` class defines script constants for Query Builder column types.

## Constants Summarized

| Type                                                     | Name                                    | Summary                    |
| -------------------------------------------------------- | --------------------------------------- | -------------------------- |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [NUMERIC](#numeric)                     | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_BIG\_DECIMAL](#type_big_decimal) | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_BIG\_INTEGER](#type_big_integer) | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_BINARY](#type_binary)            | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_BLOB](#type_blob)                | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_BOOLEAN](#type_boolean)          | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_BYTE](#type_byte)                | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_CHARACTER](#type_character)      | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_CLOB](#type_clob)                | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_DATE](#type_date)                | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_DOUBLE](#type_double)            | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_FLOAT](#type_float)              | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_IMAGE](#type_image)              | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_INTEGER](#type_integer)          | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_SHORT](#type_short)              | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_STRING](#type_string)            | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_TEXT](#type_text)                | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_TIME](#type_time)                | Constant used for casting. |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [TYPE\_TIMESTAMP](#type_timestamp)      | Constant used for casting. |

## Constants Detailed

### NUMERIC

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_BIG\_DECIMAL

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_BIG\_INTEGER

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_BINARY

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_BLOB

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_BOOLEAN

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_BYTE

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_CHARACTER

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_CLOB

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_DATE

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_DOUBLE

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_FLOAT

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_IMAGE

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_INTEGER

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_SHORT

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_STRING

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_TEXT

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_TIME

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

### TYPE\_TIMESTAMP

Constant used for casting.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var query = datasources.db.example_data.orders.createSelect();
query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
```

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.servoy.com/reference/servoycore/dev-api/database-manager/query_column_types.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
