Skip to content

Statement settings ​

A SETTINGS clause changes data-format behavior for one statement. It can choose a CSV delimiter, a JSON output policy or another option supported by the selected format.

These options are not persisted. Use SET for supported database settings such as request resource limits; those names do not belong in a format SETTINGS clause.

Output example ​

sql
SELECT 7 AS id, 'Ada' AS name
SETTINGS csv_separator = ';'
FORMAT csv;
text
7;"Ada"

Output statements also accept format settings after the FORMAT name. Each format page lists the options relevant to its codec.

Input placement ​

On INSERT, SETTINGS must precede FORMAT. The request bytes after the format name are input data, so a later settings clause would be interpreted as data rather than SQL.

text
INSERT INTO people
SETTINGS csv_separator = ';'
FORMAT csv
7;Ada

See format settings and INSERT INTO.