Book Contents

Book Index

Next Topic

Home

String Constants (Standard)

Syntax

'characters'

Semantics

characters is an arbitrary sequence of UTF8 characters bounded by single quotes (').

Using Single Quotes in a String

The SQL standard way of writing a single-quote character within a string constant is to write two adjacent single quotes. for example:

'Chester''s gorilla'

Vertica SQL also allows single quotes to be escaped with a backslash (\). For example:

'Chesters\'s gorilla'

C-Style Backslash Escapes

Vertica SQL also supports the following C-style backslash escapes. Any other character following a backslash is taken literally.

Notes

Examples

=> SELECT 'This is a string';

?column?

------------------

This is a string

(1 row)