E
E
er122014-12-06 11:22:15
PostgreSQL
er12, 2014-12-06 11:22:15

How to escape quotes in Postgresql?

the table t has a column c containing two single quotes. it is necessary to make a selection with the condition that c is equal to two single quotes

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Spirin, 2014-12-07
@MipH

An apostrophe (single quote) is escaped by an apostrophe in SQL, i.e.
*total 6 apostrophes.

A
Andrey Burov, 2014-12-06
@BuriK666

WHERE c = '""' OR c = '\'\''

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question