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




Argument Description
max Allow a maximum of 256mb

Additional information

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

String literals

  • 'Single quotes surround all string literals'
  • 'A single quote that''s contained in a string literal is escaped with a second single quote'
  • 'A string literal containing ""double-quotes"" can be escaped using a second double-quote'
  • Multi-line string literals are prefixed with x:
x'<first line>
<second line>'

The closing quote of a multi-line string literal must follow the final value


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%';