Skip to main content Link Menu Expand (external link) Document Search Copy Copied

STRING data type

The STRING data type has a keyed-mutex internal type and is recommended for queries:

  • on discrete values,
  • with group by where cardinality is low

Syntax

STRING[(max)]

Arguments

Argument Description
max Allow a maximum of 256mb

Additional information

A CREATE TABLE statement with _id STRING will increase disk requirements and query duration.

Constraining string values

Single quotation marks are used for string values in the following statements:

Examples

create table products
  (_id id, item string, price decimal(2) stock int);
create table services
  (_id id, servicelist string, price decimal(2));

SELECT FROM string column

SELECT * FROM products WHERE item LIKE '%pen%';