Skip to content

Commit

Permalink
Add example of quote escaping.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Jul 10, 2023
1 parent 0e4dacd commit 9752afb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/user/general/datatypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,13 @@ String Data Types

A string is a sequence of characters enclosed in either single or double quotes. For example, both 'text' and "text" will be treated as string literal. To use quote characters in a string literal, you can use two quotes of the same type as the enclosing quotes or a backslash symbol (``\``)::

os> SELECT 'hello', "world", '"hello"', "'world'", '''hello''', """world""", 'I\'m', "I\"m"
os> SELECT 'hello', "world", '"hello"', "'world'", '''hello''', """world""", 'I\'m', 'I''m', "I\"m"
fetched rows / total rows = 1/1
+-----------+-----------+-------------+-------------+---------------+---------------+----------+----------+
| 'hello' | "world" | '"hello"' | "'world'" | '''hello''' | """world""" | 'I\'m' | "I\"m" |
|-----------+-----------+-------------+-------------+---------------+---------------+----------+----------|
| hello | world | "hello" | 'world' | 'hello' | "world" | I'm | I"m |
+-----------+-----------+-------------+-------------+---------------+---------------+----------+----------+
+-----------+-----------+-------------+-------------+---------------+---------------+----------+----------+----------+
| 'hello' | "world" | '"hello"' | "'world'" | '''hello''' | """world""" | 'I\'m' | 'I''m' | "I\"m" |
|-----------+-----------+-------------+-------------+---------------+---------------+----------+----------+----------|
| hello | world | "hello" | 'world' | 'hello' | "world" | I'm | I'm | I"m |
+-----------+-----------+-------------+-------------+---------------+---------------+----------+----------+----------+

Boolean Data Types
==================
Expand Down

0 comments on commit 9752afb

Please sign in to comment.