mirror of
https://github.com/jbranchaud/til
synced 2026-01-07 00:58:02 +00:00
475 B
475 B
Escaping A Quote In A String
In PostgreSQL, strings (varchar and text) literals are declared with
single quotes ('). That means that any string containing a single quote as
part of the content of the string will need some escaping. The way to escape
a single quote is with another single quote.
> select 'what''s up!';
?column?
------------
what's up!