Strings

Strings in PRQL can use either single or double quotes:

PRQL

derive x = "hello world"

SQL

SELECT
  'hello world' AS x

PRQL

derive x = 'hello world'

SQL

SELECT
  'hello world' AS x

To quote a string containing quotes, either use the “other” type of quote, or use three-or-more quotes, and close with the same number.

PRQL

derive x = '"hello world"'

SQL

SELECT
  '"hello world"' AS x

PRQL

derive x = """I said "hello world"!"""

SQL

SELECT
  'I said "hello world"!' AS x

PRQL

derive x = """""I said """hello world"""!"""""

SQL

SELECT
  'I said """hello world"""!' AS x

Note

Currently PRQL does not adjust escape characters.

Warning

Currently PRQL allows multiline strings with either a single character or multiple character quotes. This may change for strings using a single character quote in future versions.